mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-25 16:43:33 +00:00
fix shaders
This commit is contained in:
parent
59560e84eb
commit
9f821e5df2
files/materials
@ -157,10 +157,15 @@
|
||||
shUniform(float4, shadowFar_fadeStart) @shSharedParameter(shadowFar_fadeStart)
|
||||
#endif
|
||||
|
||||
#if UNDERWATER
|
||||
#if (UNDERWATER) || (FOG)
|
||||
shUniform(float4x4, worldMatrix) @shAutoConstant(worldMatrix, world_matrix)
|
||||
shUniform(float, waterLevel) @shSharedParameter(waterLevel)
|
||||
shUniform(float4, cameraPos) @shAutoConstant(cameraPos, camera_position)
|
||||
#endif
|
||||
|
||||
#if UNDERWATER
|
||||
|
||||
shUniform(float, waterLevel) @shSharedParameter(waterLevel)
|
||||
|
||||
shUniform(float4, lightDirectionWS0) @shAutoConstant(lightDirectionWS0, light_position, 0)
|
||||
|
||||
shSampler2D(causticMap)
|
||||
@ -211,8 +216,12 @@
|
||||
|
||||
|
||||
float3 caustics = float3(1,1,1);
|
||||
#if UNDERWATER
|
||||
|
||||
#if (UNDERWATER) || (FOG)
|
||||
float3 worldPos = shMatrixMult(worldMatrix, float4(objSpacePositionPassthrough,1)).xyz;
|
||||
#endif
|
||||
|
||||
#if UNDERWATER
|
||||
float3 waterEyePos = float3(1,1,1);
|
||||
// NOTE: this calculation would be wrong for non-uniform scaling
|
||||
float4 worldNormal = shMatrixMult(worldMatrix, float4(normal.xyz, 0));
|
||||
|
@ -187,11 +187,13 @@
|
||||
shUniform(float4, shadowFar_fadeStart) @shSharedParameter(shadowFar_fadeStart)
|
||||
#endif
|
||||
|
||||
#if (UNDERWATER) || (FOG)
|
||||
shUniform(float4x4, worldMatrix) @shAutoConstant(worldMatrix, world_matrix)
|
||||
shUniform(float4, cameraPos) @shAutoConstant(cameraPos, camera_position)
|
||||
#endif
|
||||
|
||||
#if UNDERWATER
|
||||
shUniform(float4x4, worldMatrix) @shAutoConstant(worldMatrix, world_matrix)
|
||||
shUniform(float, waterLevel) @shSharedParameter(waterLevel)
|
||||
shUniform(float4, cameraPos) @shAutoConstant(cameraPos, camera_position)
|
||||
shUniform(float4, lightDirectionWS0) @shAutoConstant(lightDirectionWS0, light_position, 0)
|
||||
|
||||
shSampler2D(causticMap)
|
||||
@ -222,9 +224,12 @@
|
||||
|
||||
|
||||
float3 caustics = float3(1,1,1);
|
||||
#if (UNDERWATER) || (FOG)
|
||||
float3 worldPos = shMatrixMult(worldMatrix, float4(objSpacePosition,1)).xyz;
|
||||
#endif
|
||||
|
||||
#if UNDERWATER
|
||||
|
||||
float3 worldPos = shMatrixMult(worldMatrix, float4(objSpacePosition,1)).xyz;
|
||||
float3 waterEyePos = float3(1,1,1);
|
||||
// NOTE: this calculation would be wrong for non-uniform scaling
|
||||
float4 worldNormal = shMatrixMult(worldMatrix, float4(normal.xyz, 0));
|
||||
@ -373,7 +378,6 @@
|
||||
|
||||
shOutputColour(0).xyz = gammaCorrectOutput(shOutputColour(0).xyz);
|
||||
|
||||
|
||||
#if MRT
|
||||
shOutputColour(1) = float4(depth / far,1,1,1);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user