Hello,
Would it be possible to get the HLSL source code that was used for the Corona Shader node in Ventuz 3 and Ventuz 4? We have a few legacy projects that I have been upgrading to Ventuz 5, replacing all deprecated nodes. The only node I am unable to replace is the Corona Shader due to my limited experience with writing shaders.
It's fine leaving in the legacy node with the layer engine set to Standard as there are no issues but it seems odd that these nodes are deprecated when they work just fine with the engine not in legacy mode.
It would be nice to be able to replace all deprecated nodes in these projects.
Cheers
Hello Ventuzians!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
Legacy Corona Node HLSL Shader Source Code ?
Moderator: Support
Legacy Corona Node HLSL Shader Source Code ?
Gareth - Kinetic Pixel
Re: Legacy Corona Node HLSL Shader Source Code ?
Hi Gareth,
Here you are!
The PixelShader Code:
The Vertex Shader Code:
Here you are!
The PixelShader Code:
Code: Select all
float4 lightColor : register(c0);
float4 alpha : register(c1);
float3 parameter : register(c2);
sampler Corona : register(s0);
float4 main(float2 texCoord: TEXCOORD0) : COLOR
{
float4 corona = tex2D(Corona, texCoord);
return parameter.g * pow(parameter.b, parameter.r) * corona * lightColor * alpha;
}
Code: Select all
float4x4 view_proj_matrix : register(c0);
float4x4 view_matrix : register(c4);
float4x4 texTransform : register(c8);
float4 pos0 : register(c12);
float coronaSize : register(c13);
struct VS_OUTPUT
{
float4 Pos: POSITION;
float2 TexCoord: TEXCOORD0;
};
VS_OUTPUT main( float4 Pos: POSITION )
{
VS_OUTPUT Out;
// Grab X and Y eye-space vectors in world-space ...
float3 dirX = view_matrix[0];
float3 dirY = view_matrix[1];
// ... which are used for billboarding
float4 pos = float4(0,0,0,1);
pos.xyz = pos0 + coronaSize * (Pos.x * dirX + Pos.y * dirY);
Out.Pos = mul(view_proj_matrix, pos);
// v Tex. Coord. must be flipped because they come from object space!
Out.TexCoord = mul(texTransform, float3(Pos.x + 0.5, -Pos.y + 0.5, 1.0));
return Out;
}