diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-01-26 14:46:37 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-01-26 14:46:37 +0300 |
commit | 5b299e5999e2b59e30edd4e770f64aa700e482d6 (patch) | |
tree | 17052358b339e20c44ca942e62b735ef63b23f88 /source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl | |
parent | 9bce134e56c28045aee37080f5c5b6622a07927b (diff) |
D13910: Workbench: Port shaders to use GPUShaderCreateInfo
Also adds a few things to GPUShader for easily create shaders.
Heavy usage of macros to compose the createInfo and avoid
duplications and copy paste bugs.
This makes the link between the shader request functions
(in workbench_shader.cc) and the actual createInfo a bit
obscure since the names are composed and not searchable.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D13910
Diffstat (limited to 'source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl index 48102b4dcca..076f6e80104 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl @@ -1,40 +1,8 @@ #pragma BLENDER_REQUIRE(common_math_lib.glsl) #pragma BLENDER_REQUIRE(common_view_lib.glsl) -#pragma BLENDER_REQUIRE(gpu_shader_common_obinfos_lib.glsl) -#pragma BLENDER_REQUIRE(workbench_data_lib.glsl) #pragma BLENDER_REQUIRE(workbench_common_lib.glsl) -uniform sampler2D depthBuffer; - -uniform sampler3D densityTexture; -uniform sampler3D shadowTexture; -uniform sampler3D flameTexture; -uniform usampler3D flagTexture; -uniform sampler1D flameColorTexture; -uniform sampler1D transferTexture; -uniform mat4 volumeObjectToTexture; - -uniform int samplesLen = 256; -uniform float noiseOfs = 0.0; -uniform float stepLength; /* Step length in local space. */ -uniform float densityScale; /* Simple Opacity multiplicator. */ -uniform float gridScale; /* Multiplicator for grid scaling. */ -uniform vec3 activeColor; - -uniform float slicePosition; -uniform int sliceAxis; /* -1 is no slice, 0 is X, 1 is Y, 2 is Z. */ - -uniform bool showPhi = false; -uniform bool showFlags = false; -uniform bool showPressure = false; - -#ifdef VOLUME_SLICE -in vec3 localPos; -#endif - -out vec4 fragColor; - float phase_function_isotropic() { return 1.0 / (4.0 * M_PI); |