Captain Cody Posted March 18, 2016 Share Posted March 18, 2016 Any way to make a shader come out the color you want when applying over a dark colored object? Due to the darkness of the object, the shader is just staying black instead of changing to the color I'm trying to set it to. Link to comment
Simple0x47 Posted March 18, 2016 Share Posted March 18, 2016 Have you tried removing the object color? Link to comment
Captain Cody Posted March 18, 2016 Author Share Posted March 18, 2016 How would I do that aye? Link to comment
Captain Cody Posted March 19, 2016 Author Share Posted March 19, 2016 Any know how? Really need to figure out how I would go about doing this so I can move forward with my tune shop. Link to comment
Ren_712 Posted March 20, 2016 Share Posted March 20, 2016 http://pastebin.com/BbvqBHPr variables: texture sTex0, float4 sLightColor Link to comment
Captain Cody Posted March 21, 2016 Author Share Posted March 21, 2016 Thank you, I'll try it in a bit. Link to comment
Captain Cody Posted March 21, 2016 Author Share Posted March 21, 2016 Nothing. Just applys a shear black texture no mater what I set the texture, or colors as. Link to comment
Captain Cody Posted March 21, 2016 Author Share Posted March 21, 2016 Any one know good way of applying texture shader over a dark color, and still getting the color you're trying to produce instead of black, or very dark variant of that color. Link to comment
Captain Cody Posted March 21, 2016 Author Share Posted March 21, 2016 Bumpity roo, please someone help, this is last piece to puzzle I've been working on for weeks. Link to comment
Ren_712 Posted March 22, 2016 Share Posted March 22, 2016 My bad. I thought you wanted to replace the texture as well. If so, then you'll need set shader value for "sTex0". If you don't set it - the texture will appear black. Otherwise you could use this : http://pastebin.com/8ySMWAVq This doesn't require you to set anything. Link to comment
Captain Cody Posted March 23, 2016 Author Share Posted March 23, 2016 Well I set the texture to a white one "Not sure if white is overwriten in shaders or not" Any ways thank you, will allow me to finish up my modshop. Link to comment
Captain Cody Posted March 23, 2016 Author Share Posted March 23, 2016 Any way to make it so I can ajust brightness? Seams if red / blue / green are even a tad bit up, this maxes them. Link to comment
Captain Cody Posted March 24, 2016 Author Share Posted March 24, 2016 Forgive me for asking, but is there any way to get this to factor in the amount of light on it as to keep the color actually matching with in game colors? Link to comment
Ren_712 Posted March 27, 2016 Share Posted March 27, 2016 so you have a variable float4 sLightColor. You can set all 4 color components (red - green - blue - alpha). Have in mind that unlike in MTA - the maximum value for the color is 1. For example: setShaderValue(myShader,"sLightCoor",1,0,0,1) - only red and alpha components are passed. Which will make the white texture appear red. setShaderValue(myShader,"sLightCoor",1,1,0,1) - will make it look yellow. Link to comment
Captain Cody Posted March 27, 2016 Author Share Posted March 27, 2016 I've already figured out that, dividing it by 255 fixes that issue, just wondering if there is a way to make it actually change depending on the amount of light,. Link to comment
Ren_712 Posted March 30, 2016 Share Posted March 30, 2016 I've already figured out that, dividing it by 255 fixes that issue, just wondering if there is a way to make it actually change depending on the amount of light,. If the texture is dark then you might want t replace it (use the shader i posted before) Link to comment
Captain Cody Posted March 30, 2016 Author Share Posted March 30, 2016 Applying the shader over the texture is working just fine, I'm just wondering if there is any way to factor in the amount of light that the gta world is emitting example : when it's night the color is darker or what not. Link to comment
Ren_712 Posted March 31, 2016 Share Posted March 31, 2016 You can create a timer and change the shader values depending on the in game time. 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