Jump to content

water and underwater shader sundir and amplitude to uniforms


shadmar
 Share

Recommended Posts

For the sake of controlling light on water during a day/night cycle and amplitude.

 

Water.shader, change :

vec3 sundir = vec3(0.707,-0.707,0.707);

to

uniform vec3 sundir = vec3(0.707,-0.707,0.707);

 

Underwater.shader, change:

float amplitude = 0.25;
vec3 sundir = vec3(0.707,-0.707,0.707);

to

uniform float amplitude = 0.25;
uniform vec3 sundir = vec3(0.707,-0.707,0.707);

  • Upvote 2

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...