BlueGit

timfa questward

Trim water/lava uniform churn and dead cull work.

Reuse frozen fluid debug uniform bags and stop treating coast edge flags as sprites during viewport cull.

timfa Tim Falken · pushed by timfa

Authored 2026-09-06 · 2 months ago

Hash
19de885f85ea01cd71d921084fd3afec01f73791
Parent
6f2c9841
1 file changed +15 −13
client/src/play/waterDebug.js +15 −13
@@ -107,23 +107,25 @@ function uniformBagFrom (p, extras = {})
107 107 }
108 108
109 109 /** Uniform bag for the water ground fragment shader. */
110 const WATER_DEBUG_UNIFORMS = Object.freeze(uniformBagFrom(DEFAULT_WATER_DEBUG, {
111 u_foamStrength: DEFAULT_WATER_DEBUG.foamStrength,
112 u_shoreClip: DEFAULT_WATER_DEBUG.shoreClip,
113 u_deepDark: DEFAULT_WATER_DEBUG.deepDark,
114 u_deepAbrupt: DEFAULT_WATER_DEBUG.deepAbrupt
115 }));
116
117 /** Uniform bag for lava ground / bloom shaders. */
118 const LAVA_DEBUG_UNIFORMS = Object.freeze(uniformBagFrom(DEFAULT_LAVA_DEBUG, {
119 u_bloomStrength: DEFAULT_LAVA_DEBUG.bloomStrength,
120 u_shoreClip: DEFAULT_LAVA_DEBUG.shoreClip
121 }));
122
110 123 export function waterDebugUniforms ()
111 124 {
112 const p = DEFAULT_WATER_DEBUG;
113 return uniformBagFrom(p, {
114 u_foamStrength: p.foamStrength,
115 u_shoreClip: p.shoreClip,
116 u_deepDark: p.deepDark,
117 u_deepAbrupt: p.deepAbrupt
118 });
125 return WATER_DEBUG_UNIFORMS;
119 126 }
120 127
121 /** Uniform bag for lava ground / bloom shaders. */
122 128 export function lavaDebugUniforms ()
123 129 {
124 const p = DEFAULT_LAVA_DEBUG;
125 return uniformBagFrom(p, {
126 u_bloomStrength: p.bloomStrength,
127 u_shoreClip: p.shoreClip
128 });
130 return LAVA_DEBUG_UNIFORMS;
129 131 }
@@ -107,23 +107,25 @@ function uniformBagFrom (p, extras = {})
107}
107}
108
108
109/** Uniform bag for the water ground fragment shader. */
109/** Uniform bag for the water ground fragment shader. */
110const WATER_DEBUG_UNIFORMS = Object.freeze(uniformBagFrom(DEFAULT_WATER_DEBUG, {
111 u_foamStrength: DEFAULT_WATER_DEBUG.foamStrength,
112 u_shoreClip: DEFAULT_WATER_DEBUG.shoreClip,
113 u_deepDark: DEFAULT_WATER_DEBUG.deepDark,
114 u_deepAbrupt: DEFAULT_WATER_DEBUG.deepAbrupt
115}));
116
117/** Uniform bag for lava ground / bloom shaders. */
118const LAVA_DEBUG_UNIFORMS = Object.freeze(uniformBagFrom(DEFAULT_LAVA_DEBUG, {
119 u_bloomStrength: DEFAULT_LAVA_DEBUG.bloomStrength,
120 u_shoreClip: DEFAULT_LAVA_DEBUG.shoreClip
121}));
122
110export function waterDebugUniforms ()
123export function waterDebugUniforms ()
111{
124{
112 const p = DEFAULT_WATER_DEBUG;
125 return WATER_DEBUG_UNIFORMS;
113 return uniformBagFrom(p, {
114 u_foamStrength: p.foamStrength,
115 u_shoreClip: p.shoreClip,
116 u_deepDark: p.deepDark,
117 u_deepAbrupt: p.deepAbrupt
118 });
119}
126}
120
127
121/** Uniform bag for lava ground / bloom shaders. */
122export function lavaDebugUniforms ()
128export function lavaDebugUniforms ()
123{
129{
124 const p = DEFAULT_LAVA_DEBUG;
130 return LAVA_DEBUG_UNIFORMS;
125 return uniformBagFrom(p, {
126 u_bloomStrength: p.bloomStrength,
127 u_shoreClip: p.shoreClip
128 });
129}
131}