0
Lokið

Displacement shader won't work with view direction

Brad Hammond 10 ár síðan updated by Hazed_blue 8 ár síðan 10
When I am hooking up displacement nodes as soon as I introduce, view dir, bi dir normal or fresnal it stops working. Not exactly sure if this is expected behavior or not. If so is there a work around for getting the fresnal value?

Answer

Answer
Lokið
This has now been fixed in 1.17, at least for all but fresnel. A manual fresnel works though! dot( normal, view )
Under review
It should work with the latest version. Which version are you using?
Ah righto, I'm on an old version. 

Cheers
Does it work with the latest version?
Asset store is down for maintenance so can't update just now. 
Ah, yep, fair call. Will do next time 
Answer
Lokið
This has now been fixed in 1.17, at least for all but fresnel. A manual fresnel works though! dot( normal, view )
Cheers. Will give it a go

Heya,

Apologies for bumping an old report, but I'm running v1.27, and am encountering this same error, or similar. I'm attempting to use the view direction node to define tessellation areas, but it breaks the shader. View Direction, View Reflection, Half Direciton, etc, anything involving or related to a view vector seems to break it. Is there something else I should be doing to make this work properly, or is it unintended behavior?

Usually this is because the view vector is defined by the position of the mesh, but you're trying to use it before the position of the mesh has been defined. You can probably construct your own view vector though, using normalize( cameraPos - worldPos ), although I'm not sure if you can use worldPos for that

Hey, that might actually work! I'm getting close, but I'm only getting the mask on the right direction of the mesh facing the camera, not both. Trying to figure out where I went wrong here...