For whoever was asking about the piggy bank I just added a plastic shader and used geometry editor to create the opening. It would be better to create a transparency map that way the openning could be centered (there maybe a way to do that with the geo editor but I don't know how)
Hi everyone.
I was wondering if there was a definitive guide somewhere as to the uniforms which threejs passes to shaders. Even just a simple list of what they are (like vUV, vOffest etc etc) and what material shaders have access to what uniforms.
When writing custom shaders, a couple of times now I have written some long-winded glsl just to find that threejs already had something I could have either directly used or at least piggy-backed from.
If you are looking to utilize the existing materials/shaders then you need to rework your shader to use shader chunks (override the PlayCanvas internal shaders) instead of creating a full custom shader.
There has been work recently in the engine to split the internal shaders to frontend / backend, to make it easier to add lighting support to custom shaders. Someone from the PlayCanvas team may be able to offer some insight on how to use that @Elliott @mvaligursky.
First, I need to generate the velocity buffer. As the author explains: we render the geometry, transforming every vertex by both the current model-view-projection matrix as well as the previous model-view-projection matrix. In the vertex shader we do the following.
This is advanced barrel distortion adjustment tool for advanced users who knows what they're doing and wants to tweak their SteamVR headsets. This most likely will not work on headsets that piggy back on SteamVR such as WMR or Oculus.
This image shows a before and after for each method and the shader functions used. The output of this function goes straight into the opacity mask slot. This is a normal foliage shader with Material Domain set to surface, Blend Mode to Masked and Shading Model to Two Sided Foliage.
I updated the OP to include shaders for Prey and Doom 3. Prey I'm not sure why they have 5 or 6 different interaction programs, I simply replace them all(which is probably not correct), but it works.
Currently the specular red channel is being used for roughness, and the metallic is set to 0.5. The shader can be easily modified so specular red channel is roughness and specular green channel is metallic.
I really liked Prey multiplayer, it's always been my hope that the game would be open sourced and we could do a proper visual upgrade to bring back some multiplayer interest. Maybe that might happen with the PBR shader.
I might be able to do a proper SSS shader with whats exposed. If you can create some subsurface assets for one of the faces, I'll see if I can add SSS support with what's exposed by the default engine.
I have had a somewhat similar problem on normal maps from substance painter where I will get polygonal banding in Blender even though the map seems to work fine in substance and on sketchfab. I've used both DirectX and OpenGL with the same result. The problem may not be related, so I hope you don't mind me piggy-backing ben-reynolds . I seem to always struggle with getting a clean normal map that behaves predictably, no matter what program I bake with, so I am all ears on this thread.
the '-g piggy' is very important. it's the group name that the textures apply to. In my case that was the name of my root node exported out of Maya. If that's wrong, or missing, or includes unsupported characters, the textures won't apply.
I'm currently piggy backing on a mod framework (Multitheft Auto) and trying to read the depth buffer in D3DFMT_D24S8 (DirectX9). I can read it if I change the format to D3DFMT_D32F_LOCKABLE and then lock the rectange but this causes the render to be blurred like so:
You can read the depth buffer in a pixel shader if you use one of the special formats described at -p.info/texts/D3D9GPUHacks.html. They are somewhat GPU vendor specific, but you can probably get away with just INTZ support.
Turns out setting the resolution to 16 bit instead of 32 caused the blurring to go away. Figuring there was some pixel shader using the depth buffer that was able to deal with 16 bit color / 32 bit depth and 32 bit color / 24 bit depth, but not 32 bit color / 32 bit depth. Thanks @DarthMelkor for the Direct3D Ex suggestion. I may look more into that if there are more problems with changing the depth format. I don't have control over the initial device creation by GTA San Andreas though, so I'm not sure if I'd be able to use the UpdateSurface approach (I've def tried Direct3D 9 and get a format restriction error).
Finally I have a fully functional implementation of Bidirectional path tracing with some basic multiple importance sampling for the path weights. To celebrate having this new renderer in the code base I decided to have another crack at implementing a ceramic like shader. In the past I had modeled this material in geometry by placing a diffuse textured sphere inside an ever so slightly larger glass sphere to model the glaze/polish of the material. However, this method was a clunky approximation and severely limited the complexity of the models which it could be applied to.
Add this shader to a material, then add the script to your camera and the material to the DMmat variable on the script. Now when you move your camera in scene space (or if objects in view have movement relative to the camera), you should see motion vectors visualized as color, but only during movement.
Now you have your basic datamosh effect! The shader will start recycling the same pixels from the previous frame once you hold down the left mouse button, displacing them further each frame by the motion vectors, and will clear by rendering the _MainTex texture when you let go.
Embark on an otherworldly odyssey with "Luminous Dreams": a visionary Deferred Renderer Pack (or Shader) meticulously crafted for the luminous realm of Minecraft Bedrock Edition's 1.20.40 (Beta/Preview), powered by the revolutionary Render Dragon Engine. This shader transcends the limits of ordinary visuals, weaving an intricate tapestry that melds the virtual and the tangible.
df19127ead