• 0

Need a little help with TrueGlass config


Go to solution Solved by turbofandude,

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!!!

Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
  • Solution

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

Link to post
Share on other sites
  • 0
On 12/5/2018 at 7:05 PM, turbofandude said:

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

Hi turbofandude

Could you point me to a forum where I could learn how to add TrueGlass to an aircraft that I do not have the source 3D model file?

This is not for commercial or freeware distribution.

Basically I need a guide on how to implement TrueGlass.

Looking forward to your reply.

Thank you.

 

Link to post
Share on other sites
  • 0

This topic has been automatically locked due to no responses being given in the past 60 days. If you need any further help, please create a new, detailed forum post or speak to a Community Moderator or Staff Member.

Title: Need a little help with TrueGlass config
Locked At: 09/09/2020
Locked By: Otto Pilot

- TFDi Design Forum Management

Link to post
Share on other sites
Guest
This topic is now closed to further replies.