About the new nodes;
Assuming you have two vectors, a and b (The black ones in the image), you get get the resulting vectors a1 and a2 using Vector Projection and Vector Rejection.
The Vector Projection node gets you the green vector, a1
The Vector Rejection node gets you the red vector, a2
Ok, I created a flow refraction shader using the example refraction shader as a base. Itāll flow the texture, refract anything behind it. Iāve it designed to support a flow texture, a refraction texture, flow speed, flow direction, flow emission, refraction intensity, and you can add color to it.
With that said onto my issue. I canāt seam to get specular to work. I want to be able to add a āshineā to it, but neither gloss or specular seam to do anything. I think it has something to do with the refraction as once I sent refraction intensity to 0 itās ok. Any ideas how to go about fixing this? Attached is my current shader progress.
I tried running it, but it seems to work fine for me, with reflections and all. Are you sure your scene and preview is set up correctly? Lights are on etc?
Itās just specular that wonāt seam to do anything. Iām using DX11, Deferred Lighting, Linear Color Space, and 1 light next to it. Iāve tried upping the specular a ton, adding a slider to it, adding a color to it. Changing it just doesnāt seam to do anything. If I set the refraction intensity to 0 then it works.
Iāve found a pretty critical showstopping bug. on ANY shader I make none of my properties show up and the shader is bright pink, even with just a diffuse slot. This ShaderForge is a clean install.
Known issue. Has been fixed and will be released in the next version.
For the time being a workaround I found was to setup a property thatās needed for evaluating the defuse, compile the shader. Those properties seem to show up in the properties window most I the time. You should then be able to safely break the link and use it where you actually want.
Deferred is the culprit, I believe. SF doesnāt make deferred passes at the moment, which means some shaders canāt be rendered properly. Transparency and DX11 tessellation being the two known cases where things break so far. Switch to forward and it should work
Like DSebJ said, itās a known issue, but has been fixed in 0.18, which is now in Unityās hands waiting to be approved!
Is there a way to recreate this shader in ShaderForgeā¦
The shader has the road mesh plain appear flush with the terrain, but without z-fighting. What I have managed to get is a road shader where the further to the camer view it is the higher up the road becomes, The 2 main problems I have are the roads appear to be āaboveā the terrain, even if itās just by a tiny bit, the other issue is anything on the road such as players feet or dropped weapons āsinkā into the road some. If i push the road down any more than it is right now t z-fights
Amazing asset! Iām curious about the deferred lightingā¦specifically transparency (your vegetation shader to be exact). As you mentioned, this has issues in deferred mode. Is this simply not possible, or a feature that is still in the works?
Possibly! Although there is a refraction shader included in the example assets
Thanks!
SF doesnāt render deferred passes, so all shaders created in SF are rendered in forward rendering, regardless of your render pipe setting.
So, what basically breaks (from what I can see so far): Alpha blending, alpha clipping and Tessellation.
It is planned, but it might take a while to get it sorted out, because deferred works in completely different ways!
Iām not sure thatās the issue. Transparency seams to be working fine. Everything is except Specular. I even changed to forward rendering (which I canāt as my game doesnāt look good with it) and thereās still no Specular. I wonder if this is just an issue with the Normal being generated by my texture.
Really love SF so far! It needs a lot of convinient features for managing big graphs(collapsable compounds, node instances, labeled fields, wire routing points, etc.) but since its still a beta i am sure the future will bring some of these. The functionality is already outstanding Like already mentioned i also hope that we can author shaders that work in deferred mode at some point.
I would be interested to learn more about the PBL and especially about what could eventually break the energy conservation. Does the energy conservation happen in the main node and everything we plug into it will be automatically handled correctly or do we need to take care about some things? Another question i have is, what is the best way to get custom fresnel curves for reflectivity:
my idea is to have a second fresnel node inverted and added on top of the first fresnel node before multiplying it onto the specular color/map. Is that a good way to do it or are there better ways?
However, love the tool and already made a neat PB IBL multi purpose shader in no time: