Captain Cody Posted December 10, 2016 Posted December 10, 2016 Any way to only apply a shader to a surface that is 90 or less degrees? If that makes any sense, for example; apply it on side walks but not on walls.
Ren_712 Posted December 12, 2016 Posted December 12, 2016 world normal.z should be close to 1 - That means that surface normal points up. There is a snow shader that uses that condition: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3419
Captain Cody Posted December 12, 2016 Author Posted December 12, 2016 I was trying to modify a snow shader to only apply to flat and slightly curved surfaces. That is in fact that one I was using. Doesn't work, could it have something to do with all custom objects?
Ren_712 Posted December 13, 2016 Posted December 13, 2016 If it works for gtasa map then it should work for other objects as well. Check out shader roadshine1 - if it works properly for those objects. The issue might be that the objects don't have proper normals. Use kams script to export objects from 3ds - some other scripts mess up normals to prevent dynamic vertex lights from blinking - but also prevent mta from generating normals.
Captain Cody Posted December 13, 2016 Author Posted December 13, 2016 Well what I did fixed it for me. due to there only being a small variety of texture names. (Just general *road*,*grass*,*concr*) not to sure why the surface direction thing is not functioning because it's a direct conversion from VC and LC so there shouldn't be any issues with the models.
Ren_712 Posted December 21, 2016 Posted December 21, 2016 actually custom objects have this issue with directional lights https://community.multitheftauto.com/index.php?p=resources&s=details&id=10186 Some don't - the ones that have normals set to (0,0,-1) for every vertex have this issue 'fixed' but any shader that uses normal works improperly.
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