ErrorWater

所属分类:Unity3D
开发工具:HLSL
文件大小:0KB
下载次数:0
上传日期:2022-10-23 20:51:53
上 传 者sh-1993
说明:  为Unity的内置渲染管道专门为VR制作的水着色器,
(A water shader made for Unity s built-in render pipeline specifically made for VR,)

文件列表:
ForwardSSR/ (0, 2022-10-23)
ForwardSSR.meta (172, 2022-10-23)
blend.meta (172, 2022-10-23)
blend/ (0, 2022-10-23)
blend/notice.txt (136, 2022-10-23)
blend/notice.txt.meta (158, 2022-10-23)
blend/water.blend_ (132, 2022-10-23)
blend/water.blend_.meta (155, 2022-10-23)
materials.meta (172, 2022-10-23)
materials/ (0, 2022-10-23)
materials/water_example.mat (4095, 2022-10-23)
materials/water_example.mat.meta (182, 2022-10-23)
materials/water_example_quad.mat (3773, 2022-10-23)
materials/water_example_quad.mat.meta (182, 2022-10-23)
package.json (257, 2022-10-23)
package.json.meta (163, 2022-10-23)
shaderVar.meta (172, 2022-10-23)
shaders.meta (172, 2022-10-23)
shaders/ (0, 2022-10-23)
shaders/cginc.meta (172, 2022-10-23)
shaders/cginc/ (0, 2022-10-23)
shaders/cginc/BoxReflection.cginc (2502, 2022-10-23)
shaders/cginc/BoxReflection.cginc.meta (204, 2022-10-23)
shaders/cginc/water_common.cginc (7395, 2022-10-23)
shaders/cginc/water_common.cginc.meta (204, 2022-10-23)
shaders/cginc/water_samplers.cginc (11971, 2022-10-23)
shaders/cginc/water_samplers.cginc.meta (204, 2022-10-23)
shaders/cginc/water_structs.cginc (1106, 2022-10-23)
shaders/cginc/water_structs.cginc.meta (204, 2022-10-23)
shaders/cginc/water_tesselation.cginc (13469, 2022-10-23)
shaders/cginc/water_tesselation.cginc.meta (204, 2022-10-23)
shaders/cginc/water_vert.cginc (1850, 2022-10-23)
shaders/cginc/water_vert.cginc.meta (204, 2022-10-23)
shaders/water_tess_SSR.shader (11496, 2022-10-23)
shaders/water_tess_SSR.shader.meta (204, 2022-10-23)
... ...

# WARNING This repo requires the [BiRP to URP shader includes](https://github.com/Error-mdl/URP-ShaderIncludes-For-BiRP). It also uses git LFS for the textures, and git submodules for the SSR. Attempting to download the code through the github page will give empty dummy files for the textures and not include the SSR repo's code. Unity does not support git dependencies, so you must first install the [BiRP to URP shader includes](https://github.com/Error-mdl/URP-ShaderIncludes-For-BiRP) through the unity package manager before installing this repo with the manager. # ErrorWater An incomplete water shader written for unity's built-in render pipline developed for use in VRChat. This shader does things substantially different than most others available. For the animation of waves on the water surface it uses texture arrays containing a flipbook animation for both normals and vertex offsets, unlike most shaders which simply use two scrolling normal maps. This is a cheap way to get better looking water movement without complex calculations, as high-quality water simulations can be pre-baked from software like Blender. See the included blender file for an example. Distortion of the image underneath the water surface to simulate refraction is done by calculating the refraction direction and sampling the screen at a fixed distance along the refracted ray. This is more physically accurate than simply offsetting screen UV's by the normal, but introduces significant issues with rays exiting the screen and occlusion behind objects in front of the water. If the depth texture is available (note that soft particles must be enabled in the project for the shader to recognize if it is available) then the occlusion issue is solved by checking if the refracted pixel is in front of the water, and if it is then falling back to a different refraction behavior less likely to cause occlusion. Fog is also calculated from the depth texture using log^2 falloff. Additionally, this water shader uses my SSR implementation for forward rendering to give much better looking reflections. # To Do List - Add PBR lighting calculations (currently only uses probes and SSR for reflections) - Add different varaiants without tesselation for AMD users - Possibly add features for more ocean like water like foam and procedural waves

近期下载者

相关文件


收藏者