Merging r6493 through r6517 from trunk to ogl-es branch

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6518 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2023-08-03 19:12:11 +00:00
parent 1de0ec5459
commit e9c494503d
16 changed files with 216 additions and 85 deletions

View File

@ -11,6 +11,7 @@ float4x4 mInvWorld; // Inverted world matrix
float4x4 mTransWorld; // Transposed world matrix
float3 mLightPos; // Light position (actually just camera-pos in this case)
float4 mLightColor; // Light color
float4 mEmissive; // Emissive material color
// Vertex shader output structure
@ -83,6 +84,7 @@ PS_OUTPUT pixelMain(float2 TexCoord : TEXCOORD0,
// multiply with diffuse and do other senseless operations
Output.RGBColor = Diffuse * col;
Output.RGBColor *= 4.0;
Output.RGBColor += mEmissive;
return Output;
}

View File

@ -1,9 +1,11 @@
uniform sampler2D myTexture;
uniform vec4 mEmissive;
void main (void)
{
vec4 col = texture2D(myTexture, vec2(gl_TexCoord[0]));
col *= gl_Color;
gl_FragColor = col * 4.0;
gl_FragColor += mEmissive;
}