HDR: Fix texture animations
This commit is contained in:
parent
e61faa738b
commit
e8c75e7599
5 changed files with 10 additions and 5 deletions
|
@ -15,11 +15,12 @@ uniform int normalmap_enabled;
|
|||
uniform mat4 osg_ModelViewMatrix;
|
||||
uniform mat4 osg_ModelViewProjectionMatrix;
|
||||
uniform mat3 osg_NormalMatrix;
|
||||
uniform mat4 fg_TextureMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = osg_ModelViewProjectionMatrix * pos;
|
||||
vs_out.texcoord = multitexcoord0.st;
|
||||
vs_out.texcoord = vec2(fg_TextureMatrix * multitexcoord0);
|
||||
vs_out.vertex_normal = osg_NormalMatrix * normal;
|
||||
vs_out.view_vector = (osg_ModelViewMatrix * pos).xyz;
|
||||
}
|
||||
|
|
|
@ -20,11 +20,12 @@ uniform vec4 material_diffuse;
|
|||
|
||||
uniform mat4 osg_ModelViewProjectionMatrix;
|
||||
uniform mat3 osg_NormalMatrix;
|
||||
uniform mat4 fg_TextureMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = osg_ModelViewProjectionMatrix * pos;
|
||||
vs_out.texcoord = multitexcoord0.st;
|
||||
vs_out.texcoord = vec2(fg_TextureMatrix * multitexcoord0);
|
||||
vs_out.vertex_normal = osg_NormalMatrix * normal;
|
||||
|
||||
// Legacy material handling
|
||||
|
|
|
@ -15,11 +15,12 @@ uniform bool flip_vertically;
|
|||
uniform mat4 osg_ModelViewMatrix;
|
||||
uniform mat4 osg_ModelViewProjectionMatrix;
|
||||
uniform mat3 osg_NormalMatrix;
|
||||
uniform mat4 fg_TextureMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = osg_ModelViewProjectionMatrix * pos;
|
||||
vs_out.texcoord = multitexcoord0.st;
|
||||
vs_out.texcoord = vec2(fg_TextureMatrix * multitexcoord0);
|
||||
if (flip_vertically)
|
||||
vs_out.texcoord.y = 1.0 - vs_out.texcoord.y;
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ uniform bool flip_vertically;
|
|||
uniform mat4 osg_ModelViewMatrix;
|
||||
uniform mat4 osg_ModelViewProjectionMatrix;
|
||||
uniform mat3 osg_NormalMatrix;
|
||||
uniform mat4 fg_TextureMatrix;
|
||||
|
||||
// aerial_perspective.glsl
|
||||
vec4 get_aerial_perspective(vec2 coord, float depth);
|
||||
|
@ -23,7 +24,7 @@ vec4 get_aerial_perspective(vec2 coord, float depth);
|
|||
void main()
|
||||
{
|
||||
gl_Position = osg_ModelViewProjectionMatrix * pos;
|
||||
vs_out.texcoord = multitexcoord0.st;
|
||||
vs_out.texcoord = vec2(fg_TextureMatrix * multitexcoord0);
|
||||
if (flip_vertically)
|
||||
vs_out.texcoord.y = 1.0 - vs_out.texcoord.y;
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ uniform vec4 material_diffuse;
|
|||
uniform mat4 osg_ModelViewMatrix;
|
||||
uniform mat4 osg_ModelViewProjectionMatrix;
|
||||
uniform mat3 osg_NormalMatrix;
|
||||
uniform mat4 fg_TextureMatrix;
|
||||
|
||||
// aerial_perspective.glsl
|
||||
vec4 get_aerial_perspective(vec2 coord, float depth);
|
||||
|
@ -30,7 +31,7 @@ void main()
|
|||
gl_Position = osg_ModelViewProjectionMatrix * pos;
|
||||
vN = osg_NormalMatrix * normal;
|
||||
vP = (osg_ModelViewMatrix * pos).xyz;
|
||||
texcoord = multitexcoord0.st;
|
||||
texcoord = vec2(fg_TextureMatrix * multitexcoord0);
|
||||
|
||||
// Legacy material handling
|
||||
if (color_mode == MODE_DIFFUSE)
|
||||
|
|
Loading…
Reference in a new issue