mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-08 23:25:40 +12:00
Merge pull request #244 from GPUCode/little-star
gpu: Saturate color before interpolation
This commit is contained in:
commit
28f0b938f5
1 changed files with 3 additions and 2 deletions
|
@ -64,7 +64,8 @@ float decodeFP(uint hex, uint E, uint M) {
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
gl_Position = a_coords;
|
gl_Position = a_coords;
|
||||||
v_colour = a_vertexColour;
|
vec4 colourAbs = abs(a_vertexColour);
|
||||||
|
v_colour = min(colourAbs, vec4(1.f));
|
||||||
|
|
||||||
// Flip y axis of UVs because OpenGL uses an inverted y for texture sampling compared to the PICA
|
// Flip y axis of UVs because OpenGL uses an inverted y for texture sampling compared to the PICA
|
||||||
v_texcoord0 = vec3(a_texcoord0.x, 1.0 - a_texcoord0.y, a_texcoord0_w);
|
v_texcoord0 = vec3(a_texcoord0.x, 1.0 - a_texcoord0.y, a_texcoord0_w);
|
||||||
|
@ -94,4 +95,4 @@ void main() {
|
||||||
// There's also another, always-on clipping plane based on vertex z
|
// There's also another, always-on clipping plane based on vertex z
|
||||||
gl_ClipDistance[0] = -a_coords.z;
|
gl_ClipDistance[0] = -a_coords.z;
|
||||||
gl_ClipDistance[1] = dot(clipData, a_coords);
|
gl_ClipDistance[1] = dot(clipData, a_coords);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue