Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions package/Shaders/Water.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -215,27 +215,19 @@ VS_OUTPUT main(VS_INPUT input)
float2 scrollAdjust2 = posAdjust / NormalsScale.yy;
float2 scrollAdjust3 = posAdjust / NormalsScale.zz;

# if defined(UNIFIED_WATER) && defined(NORMAL_TEXCOORD)
# if defined(UNIFIED_WATER) && defined(NORMAL_TEXCOORD)
float2 cellShift = float2(floor(ObjectUV.z * 0.5), floor((ObjectUV.z - 1.0) * 0.5));
float2 scaledUV = input.TexCoord0.xy * ObjectUV.z - cellShift;
# endif
# endif

# if !(defined(FLOWMAP) && (defined(REFRACTIONS) || defined(BLEND_NORMALS) || defined(DEPTH) || NUM_SPECULAR_LIGHTS == 0))
# if defined(NORMAL_TEXCOORD)
float3 normalsScale = 0.001 * NormalsScale.xyz;
# if defined(UNIFIED_WATER)
if (ObjectUV.x) {
scrollAdjust1 = scaledUV / normalsScale.xx;
scrollAdjust2 = scaledUV / normalsScale.yy;
scrollAdjust3 = scaledUV / normalsScale.zz;
}
# else
if (ObjectUV.x) {
scrollAdjust1 = input.TexCoord0.xy / normalsScale.xx;
scrollAdjust2 = input.TexCoord0.xy / normalsScale.yy;
scrollAdjust3 = input.TexCoord0.xy / normalsScale.zz;
}
# endif
# else
if (ObjectUV.x) {
scrollAdjust1 = 0.0;
Expand Down