====== URP Render Feature ====== To have Dragon Water working, you need to add ''DragonWaterRenderFeature'' to every of your URP renderer. \\ You will also need to take care of this URP configuration: * Enabled depth texture is required in order to have edge foam and water depth working. * Enabled opaque texture is optional, but required if you want to use refraction. {{:water:urp_render_feature.png?direct&400|}} Water surface is rendered in additional pass, between opaque and transparent objects, when depth and opaque textures have been already acquired in URP pipeline. \\ However, water surface is drawn with enabled depth writing and while rendering transparent objects with custom shader you may want to have access to depth and opaque textures that already include water surface. \\ To achieve this, you have access to following settings: * **Recopy Depth Texture** - enqueues additional pass, that will once again acquire depth texture just after rendering water. In other words, when enabled, all custom shaders that run in transparent queue will use depth texture that include water surface. * **NOTE:** This option works only if you use deferred rendering path or forward with forced priming mode. * **Recopy Opaque Texture** - enqueues additional pass, that will once again acquire screen texture just after rendering water. In other words, when enabled, all custom shaders that run in transparent queue will use screen texture that include water surface. ---- ===== Surface Camera Snap ===== As described in [[.underwater-profile]], underwater in Dragon Water is binary, so either everything on screen is underwater or not. \\ This render pass automatically snaps camera position to be just below or just above water surface when it's too close to avoid seeing unwanted water edges on screen. \\ You don't have to do anything more, your camera controller stay the same with all linear transform interpolations - snapping is done at lower, rendering level. * **Near Clip Factor** - multiplier of cameras near plane distance, used to snap to water surface. For better results, keep cameras near plane as low as possible and use higher factor here. ---- ===== Water Cutout ===== This render pass is used when one of your water surfaces have cutout enabled. \\ It draws special screen-space mask for cutout. * **Mask Resolution Scale** - scale of screen resolution used for drawing water cutout mask. In most cases value in range 0.25-0.5 is enough.