Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-01-26 14:46:37 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-01-26 14:46:37 +0300
commit5b299e5999e2b59e30edd4e770f64aa700e482d6 (patch)
tree17052358b339e20c44ca942e62b735ef63b23f88 /source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
parent9bce134e56c28045aee37080f5c5b6622a07927b (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_effect_dof_frag.glsl')
-rw-r--r--source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl31
1 files changed, 0 insertions, 31 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
index c4580e6ffc3..e9525ce9de0 100644
--- a/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
+++ b/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
@@ -7,19 +7,6 @@
* Converted and adapted from HLSL to GLSL by Clément Foucault
*/
-uniform vec2 invertedViewportSize;
-uniform vec2 nearFar;
-uniform vec3 dofParams;
-uniform float noiseOffset;
-uniform sampler2D inputCocTex;
-uniform sampler2D maxCocTilesTex;
-uniform sampler2D sceneColorTex;
-uniform sampler2D sceneDepthTex;
-uniform sampler2D backgroundTex;
-uniform sampler2D halfResColorTex;
-uniform sampler2D blurTex;
-uniform sampler2D noiseTex;
-
#define dof_aperturesize dofParams.x
#define dof_distance dofParams.y
#define dof_invsensorsize dofParams.z
@@ -53,9 +40,6 @@ float decode_signed_coc(vec2 cocs)
*/
#ifdef PREPARE
-layout(location = 0) out vec4 halfResColor;
-layout(location = 1) out vec2 normalizedCoc;
-
void main()
{
ivec4 texel = ivec4(gl_FragCoord.xyxy) * 2 + ivec4(0, 0, 1, 1);
@@ -99,9 +83,6 @@ void main()
*/
#ifdef DOWNSAMPLE
-layout(location = 0) out vec4 outColor;
-layout(location = 1) out vec2 outCocs;
-
void main()
{
vec4 texel = vec4(gl_FragCoord.xyxy) * 2.0 + vec4(0.0, 0.0, 1.0, 1.0);
@@ -216,14 +197,6 @@ void main()
* Outputs vertical blur and combined blur in MRT
*/
#ifdef BLUR1
-layout(location = 0) out vec4 blurColor;
-
-# define NUM_SAMPLES 49
-
-layout(std140) uniform dofSamplesBlock
-{
- vec4 samples[NUM_SAMPLES];
-};
vec2 get_random_vector(float offset)
{
@@ -308,7 +281,6 @@ void main()
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef BLUR2
-out vec4 finalColor;
void main()
{
@@ -385,9 +357,6 @@ void main()
*/
#ifdef RESOLVE
-layout(location = 0, index = 0) out vec4 finalColorAdd;
-layout(location = 0, index = 1) out vec4 finalColorMul;
-
void main()
{
/* Fullscreen pass */