Jump to content

Missing reflection shader


YouGroove
 Share

Recommended Posts

@DudeAwesome :

Last update of today fixed the material editor bug and it works (only generate material function is buggy).

What don't works for me it's the environment shader i modified.

 

@Shadmar :

Could you post your environment shader file ?

Stop toying and make games

Link to comment
Share on other sites

 

yes, just replace

outcolor = mix(outcolor,texture(texture4,cubecoord),0.5); //mix diffuse with cubemap reflection 50%

 

with

 

outcolor = mix(outcolor,texture(texture4,cubecoord),ex_color.a); //mix diffuse with cubemap reflection based on alpha

 

 

About texture having only some parts with environment it seems not working replacing the line of code.

 

I put the diffuse texture with alpha i used if someone want to test.

post-3271-0-73750500-1396812581_thumb.jpg

wall3Water.zip

Stop toying and make games

Link to comment
Share on other sites

  • 3 weeks later...

Just multiply material color-selector to the cubemap texture... vec4(ex_color.rgb,1)

 

so something like this probably

 

outcolor = mix(outcolor,texture(texture4,cubecoord)*vec4(ex_color.rgb,1),outcolor.a);

  • Upvote 1

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