dof.wgsl

Constants
Bindings
Shader defs requirments:
š¢ MULTISAMPLED
@group(0)
@binding(1)
var
depth_texture:
texture_depth_multisampled_2d
Shader defs requirments:
š“ MULTISAMPLED
@group(0)
@binding(1)
var
depth_texture:
texture_depth_2d
@group(0)
@binding(2)
var
color_texture_a:
texture_2d<f32>
Shader defs requirments:
š¢ DUAL_INPUT
@group(0)
@binding(3)
var
color_texture_b:
texture_2d<f32>
Structures
The first bokeh pass outputs to two render targets. We declare them here.
Functions
Returns the resulting color of the fragment.
frag_offset
is the vector, in screen-space units, from one sample to the next. This need not be horizontal or vertical.
Shader defs requirments:
š¢ DUAL_INPUT
@fragment
Calculates the final color of each pixel on the screen
Calculates the horizontal component of the separable Gaussian blur.
@fragment
Calculates the final color of each pixel on the screen
Calculates the vertical component of the separable Gaussian blur.
@fragment
Calculates the final color of each pixel on the screen
ⱠⱠ⢠ā ā
@fragment
Calculates the final color of each pixel on the screen
Shader defs requirments:
š¢ DUAL_INPUT
Parameters that control the depth of field effect. See
bevy_core_pipeline::dof::DepthOfFieldUniforms
for information on what these parameters mean.