• 0
tonaz

Need a little help with TrueGlass config

Question

@turbofandude Hello Collin!!

I would like to ask you some help with TrueGlass shader file.
I'm tring to add the TrueGlass on a old project of mine (personal, not commercial, and not ditribuited as freeware or payware, naturally as i signed the contract), but unfortunately i don't have no more the source 3D, so i cannot change the UV mapping of the windshield.
UV mapping in 3D model is 90 degrees rotated :-( so the drops and streaks fall horizontally from left to right.
I've found out that in the TrueGlass.hlsl i can change the BL, TL, BR, TR variables to completely invert the fall direction, for example:
Adding a minus before the variables:

v.p = float4(-bl, 0, 1)
...
v.p = float4(-tl, 0, 1)
...
v.p = float4(-br, 0, 1)
...
v.p = float4(-tr, 0, 1)

i can invert the direction.
How can i just rotate 90 degrees the direction?
Thanks a lot!!!

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

The TrueGlass shader is somewhat hard to read, but one way you could do it would be to edit the v.p and/or v.t coordinates in the GS function. Although it's not the easiest solution, applying a transformation to the vertex data before triStream.append(v) call could rotate it.

Here is a stack overflow post that explains it better: https://stackoverflow.com/questions/28124548/rotate-quad-made-in-geometry-shader

Share this post


Link to post
Share on other sites
  • 0

I read it and tried but looks like this is too much for my poor skills.

Thanks anyways :(

😢

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now