Home » Other » Shaders » Caustics Projector Shader

Model info

Content type: Shaders
Сreated by: noriben
Views: 22 580
Caustics Projector Shader

To download the model, you need to log in.

Description



It is a shader that can express what is called caustics, which creates a glittering pattern under the surface of the water. Two types are included, one that can be projected onto an object like a projector, and one that can be used directly as a material for an object. (In the V002 update, we also added a board poly version that can be used easily.) (In the V008 update, we also included a type that projects onto the part surrounded by objects._Since CameraDepthTexture is used, Realtime DirectionalLight with shadows is required. Reference video: https://twitter.com/noriben327/status/1497408020208570370

With the V004 update, it now works properly in the Quest environment of VRChat. (Confirmed with Quest2) See the Unity Reference for basic usage of the projector.
https://docs.unity3d.com/ja/2019.4/Manual/class-Projector.html

*It can be projected to most shaders, but in rare cases, it will not be projected to some shaders where projection is explicitly disabled for certain projectors. ("IgnoreProjector" = "True" in the shader) The less objects you project, the lighter the load. You can select layers not to project with Ignore Layers in the projector component. May not project properly on transparent materials. The Beta version of the projection type that surrounds the object does not work in the Quest environment. Operation has been confirmed in the built-in environment of Unity2019.4.31f1. It can be used with Unity, VRChat, etc. unitypackage format. *The avatar in the image is a modified Amanatsu-chan created by Komado.

Change log
2022/2/20 V001 Initial 2022/2/21 Added V002 Quad version 2022/2/21 Fixed V003 Quad version /22 V005 Added parameter to project only on the top of the object. Added parameter to select Blend mode. 2022/2/23 Made V006 caustics algorithm more natural. 2022/2/23 Made V007 caustics flickering random and smooth. 2022/2/26 V008 Corrected the appearance of chromatic aberration depending on the position in the material version. Added a type that projects to the part enclosed by the object as a beta version. 2022/2/26 V009 Fixed the material version to write depth correctly in VRChat. 2022/3/11 Supports V010 Single Pass Stereo (Instanced) rendering.

Operation status/use
Operation check list and how to use properly in VRChat. ■ Projector version ・It works in the world (PC, Quest). ・It does not work with avatars. ・I think it's the easiest to use. It is not very suitable for projecting large areas such as the entire world. (Because the number of batches increases) ■It works with all material versions, avatars, and worlds (PC, Quest). ・When you want to apply only to small items. lightweight. ■It works with all polyplates, avatars, and worlds (PC, Quest). ・When you want to place a caustic pattern on the floor, etc. Feel free. lightweight. ■It works only in the type world (PC) that projects to the part enclosed by the object. ・It is suitable for projecting a wide range such as the entire world. ・Since the depth information (_CameraDepthTexture) is used, Realtime DirectionalLight with shadow is required. ・It is not projected on objects that do not write depth, such as translucent objects.

explanation
■First, import the unitypackage that you downloaded first into Unity. There is a prefab file in the NoribenLunch/noribenCaustics/Prefabs folder, so drag it to the hierarchy and use it. ■ How to use the projector version Since there is a noribenCaustics_Projector object in the prefab, you can move it freely and use it. ■How to use the projector component You can change the projected size by changing the Orthographic Size. You can change the projection distance by changing the Far Clip Plane value. Change Ignore Layers to select the layer of the object to be projected. Please change the parameter of noribenCausticsForCRT material when you change the color or pattern. (No need to touch the noribenCausticsProjector material) ■ How to use the material version There is a cube and sphere with a caustics material in an object called noribenCausticsStandard_Material as a sample in the prefab. Please use the noribenCausticsStandard material by applying it to other objects. ■ How to use the board poly version There is a noribenCaustics_Quad object in the prefab, so please move it freely and use it. ■ How to use the type that projects to the part enclosed by the object Use noribenCaustics_ObjectArea in the prefab. One with a range of 5m square and one with a range of 200m square are available. Material's Object Transform if you change the object's Scale Enter the scale value of the object in the Scale parameter. (Correction of pattern size) ■ Below is a detailed explanation of the material parameters. Please refer to it if you want to adjust the parameters to create your own look. ■NoribenCausticsForCRT material description (click here to change the appearance of the projector version) Color: Change color. Texture: Base texture of caustics Tiling Tiling X: Tiling number in X direction Tiling Y: Tiling number in Y direction Scroll Scroll Speed ​​01: Scroll speed of the first texture Scroll Speed ​​02: Scroll speed of the second texture Scroll speed ■Color Effects (color tone correction, etc.) Brightness: Brightness Gamma: Gamma value Aberration: Chromatic aberration Second Map Brightness: Brightness of the second texture Flash: Blinking ■Mask (Outer edge mask) Mask Intensity: Intensity of the mask Mask Gradation: How to blur the mask Mask Shape: Change the shape of the mask. (Square and circle) ■Distortion Distortion Texture: Texture for distortion Distortion Power: Strength of distortion Distortion Scroll Speed: Scroll speed of distortion texture ■Explanation of noribenCausticsStandard material (Click here to change the appearance of material version) ■Caustics Caustics Color: Caustics color Caustics Tex: Caustics base texture UV Caustics Tiling: Tiling number Caustics UV Mode: You can choose between calculating the UVs in world coordinates and using the object's UVs. Basically, please use World Pos mode. Caustics World UV Axis: Allows you to choose the caustics projection direction. The default XZ projects from directly above. ■World Position Rotate World Position Rotate: World Position Rotate: When projected from directly above, the streaks of light look too sharp, so the direction is slightly shifted to improve the appearance. You can adjust its direction. ■Caustics Top only Display Caustics Top only Display: Displays caustics only in the top direction of the object. ■Scroll Scroll Speed ​​01: Scroll speed of the first texture Scroll Speed ​​02: Scroll speed of the second texture ■Color Effects (color correction, etc.) Gamma: Gamma value Aberration: Chromatic aberration Second Map Brightness: Second texture Brightness Flash: Blink Distortion Distortion Texture: Texture for distortion Distortion Power: Strength of distortion Distortion Scroll Speed: Scroll speed of distortion texture When projected from directly above, the lines of light look too sharp, so I shifted the direction slightly to improve the appearance. You can adjust its direction. ■Caustics Top only Display Caustics Top only Display: Displays caustics only in the top direction of the object. ■Scroll Scroll Speed ​​01: Scroll speed of the first texture Scroll Speed ​​02: Scroll speed of the second texture ■Color Effects (color correction, etc.) Gamma: Gamma value Aberration: Chromatic aberration Second Map Brightness: Second texture Brightness Flash: Blink Distortion Distortion Texture: Texture for distortion Distortion Power: Strength of distortion Distortion Scroll Speed: Scroll speed of distortion texture When projected from directly above, the lines of light look too sharp, so I shifted the direction slightly to improve the appearance. You can adjust its direction. ■Caustics Top only Display Caustics Top only Display: Displays caustics only in the top direction of the object. ■Scroll Scroll Speed ​​01: Scroll speed of the 1st textureScroll Speed ​​02: Scroll speed of the 2nd texture ■Color Effects (color correction etc.) Gamma: Gamma value Aberration: Chromatic aberration Second Map Brightness: 2nd texture Brightness Flash: Blink Distortion Distortion Texture: Texture for distortion Distortion Power: Strength of distortion Distortion Scroll Speed: Scroll speed of distortion texture
Uploaded by

Anonymous


Comments: 1
Add comment

Information

To add your comment you need to log in.

  • foto
    Skye Cane #1
    I love this shader. It's beautiful! Thank you so much for sharing it ♥
    12 September 2022 23:45