mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Changes to GLSL files for OpenGL
This commit is contained in:
parent
2142d452d4
commit
6aea37b407
98 changed files with 3366 additions and 2686 deletions
|
|
@ -26,8 +26,8 @@
|
|||
uniform sampler2D diffuseMap, refractMap, bumpMap;
|
||||
uniform vec4 shadeColor;
|
||||
|
||||
varying vec2 TEX0;
|
||||
varying vec4 TEX1;
|
||||
in vec2 TEX0;
|
||||
in vec4 TEX1;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Fade edges of axis for texcoord passed in
|
||||
|
|
@ -49,7 +49,7 @@ float fadeAxis( float val )
|
|||
//-----------------------------------------------------------------------------
|
||||
void main()
|
||||
{
|
||||
vec3 bumpNorm = texture2D( bumpMap, TEX0 ).rgb * 2.0 - 1.0;
|
||||
vec3 bumpNorm = texture( bumpMap, TEX0 ).rgb * 2.0 - 1.0;
|
||||
vec2 offset = vec2( bumpNorm.x, bumpNorm.y );
|
||||
vec4 texIndex = TEX1;
|
||||
|
||||
|
|
@ -61,8 +61,8 @@ void main()
|
|||
const float distortion = 0.2;
|
||||
texIndex.xy += offset * distortion * fadeVal;
|
||||
|
||||
vec4 diffuseColor = texture2D( diffuseMap, TEX0 );
|
||||
vec4 reflectColor = texture2DProj( refractMap, texIndex );
|
||||
vec4 diffuseColor = texture( diffuseMap, TEX0 );
|
||||
vec4 reflectColor = textureProj( refractMap, texIndex );
|
||||
|
||||
gl_FragColor = diffuseColor + reflectColor * diffuseColor.a;
|
||||
OUT_FragColor0 = diffuseColor + reflectColor * diffuseColor.a;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue