I want to copy the shader code to latex, but it seems to be diffcult to modify.
How do I keep the format of my shader code and paste in latex?
My shader code as below: (a part of my complete shader code)
Code: Select all
Ps_DEFAULT_OUT PsRenderIntoShadowDepthBuffer(Vs_DEFAULT_OUT IN){Ps_DEFAULT_OUT OUT=(Ps_DEFAULT_OUT)0;#ifdef _USE_NL_OUT.color.xyz = tex2D(tex_col_diffuse, IN.v2_tc.xy).xyz * saturate(dot(normalize(v3_light_dir), normalize(IN.v3_normal)));#elseOUT.color.xyz = tex2D(tex_col_diffuse, IN.v2_tc.xy).xyz;//*GetDiffuseLighting(IN.v4_pos_view, IN.v3_normal);#endif#ifdef _TEST_3_13_OUT.color.w = IN.v4_pos_view.z/IN.v4_pos_view.w;#elseOUT.color.w = IN.sdb_z;#endifreturn OUT;}