Material - Basic glass: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replace - "{{enHeader}}" to "")
m (Some wiki formatting)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Two pass material'''
'''Two pass material'''


First pass draws the surface, second affects Alfa and Z-buffer to keep correct visibility and shadow casting.
First pass draws the surface, second affects Alfa and Z-buffer to keep correct visibility and shadow casting.


= First RVMAT =
== First RVMAT ==


renderFlags[]={NoAlphaWrite};  
<syntaxhighlight lang="cpp">
nextPass=ofp2\Data\glass_2pass.rvmat;
renderFlags[] = { NoAlphaWrite };
nextPass = ofp2\Data\glass_2pass.rvmat;
</syntaxhighlight>




= Second RVMAT (sklo-pass2.rvmat) =
== Second RVMAT (sklo-pass2.rvmat) ==


renderFlags[]={NoColorWrite};
<syntaxhighlight lang="cpp">
ambient[]={1,1,1,1};
renderFlags[] = { NoColorWrite };
diffuse[]={1,1,1,1};
ambient[] = { 1, 1, 1, 1 };
forcedDiffuse[]={0,0,0,0};
diffuse[] = { 1, 1, 1, 1 };
emmisive[]={0,0,0,1};
forcedDiffuse[] = { 0, 0, 0, 0 };
specular[]={0,0,0,0};
emmisive[] = { 0, 0, 0, 1 };
specularPower=0;
specular[] = { 0, 0, 0, 0 };
PixelShaderID="AlphaShadow";
specularPower = 0;
VertexShaderID="Basic";
PixelShaderID = "AlphaShadow";
VertexShaderID = "Basic";
</syntaxhighlight>

Latest revision as of 14:10, 27 March 2024

Two pass material

First pass draws the surface, second affects Alfa and Z-buffer to keep correct visibility and shadow casting.

First RVMAT

renderFlags[] = { NoAlphaWrite };
nextPass = ofp2\Data\glass_2pass.rvmat;


Second RVMAT (sklo-pass2.rvmat)

renderFlags[] = { NoColorWrite };
ambient[] = { 1, 1, 1, 1 };
diffuse[] = { 1, 1, 1, 1 };
forcedDiffuse[] = { 0, 0, 0, 0 };
emmisive[] = { 0, 0, 0, 1 };
specular[] = { 0, 0, 0, 0 };
specularPower = 0;
PixelShaderID = "AlphaShadow";
VertexShaderID = "Basic";