How to change wave hieght in a scene?

Users who are viewing this thread

Artaxias

Veteran
I was wondering how to change the height of the waves in my NW scene. Currently the waves are dead calm, and I want them going at the maximum height.

Solutions?

Any help is appreciated.
 
Artaxias said:
I was wondering how to change the height of the waves in my NW scene. Currently the waves are dead calm, and I want them going at the maximum height.

Solutions?

Any help is appreciated.
I guess that they are doing it by vertex shader, haven't bought it. See if they are passing uniforms from the game.
I'm confident that latest versions of Warband have an opcode for passing floats and stuff to HLSL following WSE tradition.

Probably a bit complex to do from scratch, search the module system, particularly module_mission_templates and module_scripts.
 
See set_shader_param_int, etc. in the newest version of header_operations.  Probably wave height is a float value transmitted per scene, but I can't speak to the details.
 
Please excuse my partial thread hijack, but since we're talking about the value-to-shader operations, I want to ask: How do I use this?! I mean, there is no parameter which references the shader I'm targeting? What are shader parameters? Does every shader, everywhere have uniquely named parameters? Are parameters variables? And could someone please provide me with an example on how is that operation used? I'm sure I'd figure it out if I saw one.
 
Lumos said:
Please excuse my partial thread hijack, but since we're talking about the value-to-shader operations, I want to ask: How do I use this?! I mean, there is no parameter which references the shader I'm targeting? What are shader parameters? Does every shader, everywhere have uniquely named parameters? Are parameters variables? And could someone please provide me with an example on how is that operation used? I'm sure I'd figure it out if I saw one.

I'm going to be succinct. Basically you simply call something like this in mission templates:
Code:
(set_shader_param_float, "water_height", 1.6),  #I guess that the second one isn't enclosed as literal? Never used it.
And the game passes that uniform right to the shaders, the param thingie is misleading.

Let's see how existing uniforms passed from the engine work. Like the famous an ubiquitous
Code:
time_var
, you define them at the top with some placeholder value:
Code:
...
float time_var = 0.0f;
...
It's just a global which can be used anywhere, not a param for the GPU functions.


That's it. Now we just use it as... let's say a multiplier or a cyclic seed.
What follows is a real snippet from a swconquest vertex shader.

Code:
VS_OUTPUT_FONT vs_main_no_shadow(uniform const bool isSarlacc=false, float4 vPosition : POSITION, float3 vNormal : NORMAL, float2 tc : TEXCOORD0, float4 vColor : COLOR0, float4 vLightColor : COLOR1)
{
	VS_OUTPUT_FONT Out;
...
	if(isSarlacc){
		vPosition.x +=sin(time_var-vPosition.z)/4*saturate(vPosition.z);
		vPosition.y +=cos(time_var-vPosition.x)/4*saturate(vPosition.z);
		vPosition.z +=sin(time_var-vPosition.y)/2*saturate(vPosition.z); //move the tentacles in a menacing way :)
	}
...
	return Out;
}
 
Back
Top Bottom