Artyom888 Posted December 1, 2019 Share Posted December 1, 2019 (edited) Hi gentlemen, I have a problem with lighting the texture, it is lighter than everyone Please tell me what the problem is I use these shaders /* Author: 50p Version: v1.0 Description: This shader allows you to mask a texture with a mask texture (black and white). */ texture ScreenTexture; sampler implicitInputTexture = sampler_state { Texture = <ScreenTexture>; }; texture MaskTexture; sampler implicitMaskTexture = sampler_state { Texture = <MaskTexture>; }; float4 MaskTextureMain( float2 uv : TEXCOORD0 ) : COLOR0 { float4 sampledTexture = tex2D( implicitInputTexture, uv ); float4 maskSampled = tex2D( implicitMaskTexture, uv ); sampledTexture.a = (maskSampled.r + maskSampled.g + maskSampled.b) / 3.0f; return sampledTexture; } technique Technique1 { pass Pass1 { AlphaBlendEnable = true; SrcBlend = SrcAlpha; DestBlend = InvSrcAlpha; PixelShader = compile ps_2_0 MaskTextureMain(); } } Edited December 1, 2019 by Artyom888 Link to comment
Overkillz Posted December 1, 2019 Share Posted December 1, 2019 1 hour ago, Artyom888 said: This shader allows you to mask a texture with a mask texture (black and white). Try to use a simpler one texture ScreenTexture; technique tech { pass p0 { Texture[0] = ScreenTexture; } } Regards. Link to comment
JustinMTA Posted December 1, 2019 Share Posted December 1, 2019 Is the car body and the windows both using the shader code you provided? If so this is could be a model related issue regarding the DFF file. Let me know Link to comment
Artyom888 Posted December 2, 2019 Author Share Posted December 2, 2019 12 hours ago, JustinMTA said: Is the car body and the windows both using the shader code you provided? If so this is could be a model related issue regarding the DFF file. Let me know Yes, I use a shader on the back of the car exactly the same as you wrote me. The problem is that on the windows of the car I use the texture for uv (black) I would like to hide it and leave the stickers. (sorry for my English) Link to comment
Administrators Tut Posted December 2, 2019 Administrators Share Posted December 2, 2019 I think an easy fix would be setting the brightness of shaders which are applied on windows to 0.45 or 0.5, the former value is equilevant to vehicle surface material's. Another would be (in Max) setting the Ambient value of the window material to 0.45 or 0.5 (whatever value used by vehicle surface) but this requires editing the model. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now