SuperPhysical is a forward rendering setup and the successor of SuperPhong.
It features cook-torrance shading, physically based rendering and image based lighting.
The implementation is mainly based onhttps://learnopengl.com/#!PBR/Theory
"focusing on the PBR approach as originally explored by Disney and adopted for real-time display by Epic Games".
This revision has a lot of assets for the diffetent usage scenarios. Might need a different approach to minimize download size.
This version will be used in the workshop at NODE 17.
All feedback welcome! Have fun!
this is beautiful! thanks a lot!
wow, amazing shader, well done ;)
that's fucking sick bruh!
Really like it! Is there a way to spread the texture transform? Right now it is always using the first slice of transforms for all instances of an object.
the texture transform is currently not spreadable as it should be. will fix this in next update. for now you could use a TransformTexture effect to scale the textures per instance.
Does this work in 50beta35 64bit or did I miss something on the install?
Should be working in 50beta35. The problem is DX11 1.0, because all Dynamic Buffers are set to "Dynamic" now. If you set them back to "Default" in the Inspector it shoud be working. There is a whole bunch in the light module.
Also, new version of Superphong will be out soon.
Ok, cheers. Looking forward to new version!
As a side note this has been fixed in 1.0.1 (which is in contrib page already)
Cool, thanks for the quick fix!
The new version has a couple of changes. The light blending has been overhauled a bit. Now all the lights - image based lighting and phong lights - are treated the same way and reflections are blended with the fresnel term. This means, there is no RimLight anymore, but Global Reflection Color, Global Diffuse Color and Material Color. Also there is only one set of fresnel values for everything reflective. See girlpower for how it works. This should feel a lot more natural.
Also fixed some bugs and spreading problems.
Also new: No tiling mode. This avoids strong repitition of textures by using this code by Inigo Quilez: http://www.iquilezles.org/www/articles/texturerepetition/texturerepetition.htm
Thanks, great work!
This is a properly shaded teapot.
i am so happy i found this :)
Stay tuned for proper PBR update (Unreal Engine implementaion) with cook-torrance, parallax occlusion mapping, you name it..
i have to use an old Version (34.2) - and maybe that is why in the directionalLight-module is a red node(select transform is missing..) what needs to be connected to have it working? - it is connected to the ViewProjection Shadow.
simply replace the node with a Select(Node). This should be it!
Great contribution guys!
One question from a shader primer: is there a way to handle the alpha of the shader? I want to hide/make visible some geometries.
the alpha channel got a bit neglected.
I will bring all features back as soon as possible.
It should all work same as the standard shaders then.
wooooo!!! this is exactly what i was looking for!!
Noticed a problem with the lighting function - it behaves very badly on low poly flat geometry, you can notice the warping as the highlight goes from polygon to polygon.
low poly wire:
high poly wire:
Hi letoast, that's a known limitation. I think it's due to calculating some stuff per vertex. As this improves performance I might not change this, but thanks for reporting!
Wow men this looks amazing!
Can I use 360 HDR images for global ilumination ?
Yep, there is something wrong - I explained this in the workshop also:
The "Global Reflection Color" is not really a correct part of the lighting equation, but somethin additional. i didn't combine this correctly yet, so that's were this bug comes from. If you do your lighting only with IBL and dynamic lights everything should be correct.
If you are brave enough go to superphysical.tfx and replace Line 271 with this Line:
IBL += (saturate(GlobalReflectionColor.rgb * (kS * envBRDF.x + envBRDF.y)) * iridescenceColor);
This will also be fixed in next release.
Oh lord, I never thought it would be that simple. I wanted to fix it so at first I started replacing variables one by one with constants to see what each one does. Then I was thinking that something might be wrong in the CookTorrance implementation, so I cross referenced an opengl implementation of it with yours, but I saw yours was ok and after that I kind of gave up... Didn't know it was the kD causing the problems, but going through all of the code out of nothing, just to remember what all of the variables stand for was also not something I was prepared to do :D
As far as I understood it you just wanted to colorize the cubemap with the global reflection color?
Thanks for the quick reply, though!
Yeah, sorry for sending you on a bughunt there.
Actually this fix works for now, but is not totally correct, as any reflections of a metal surface should be colored as the material is. So e.g. only blue is reflected. I will integrate this in the next version.
A link to my question on the forum about using multiple assets in SuperPhysical
First attempt to make an Assets Manager for SuperPhysical here:
anonymous user login