diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-09-07 09:19:09 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-09-07 09:21:41 +0300 |
commit | 7170f7a0414ecded72fba3ef69e28be2be148291 (patch) | |
tree | d98075a0c6695f8ddb9f85fc5f728a5e837c2d1c /source/blender/draw/engines/eevee/eevee_lut_gen.c | |
parent | 267b8e1a5c322c87d9684638cc29c984c6d33e58 (diff) |
EEVEE: Shaders tests
This will add the remaining static shaders to the eevee shader test suite.
- Downsampling
- GGX LUT generation
- Mist
- Motion Blur
- Ambient Occlusion
- Render Passes
- Screen Raytracing
- Shadows
- Subsurface
- Volumes
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D8779
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_lut_gen.c')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_lut_gen.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lut_gen.c b/source/blender/draw/engines/eevee/eevee_lut_gen.c index 9b07a6908c3..b74cb6c7687 100644 --- a/source/blender/draw/engines/eevee/eevee_lut_gen.c +++ b/source/blender/draw/engines/eevee/eevee_lut_gen.c @@ -33,13 +33,6 @@ #include "eevee_private.h" -extern char datatoc_bsdf_lut_frag_glsl[]; -extern char datatoc_btdf_lut_frag_glsl[]; -extern char datatoc_bsdf_common_lib_glsl[]; -extern char datatoc_bsdf_sampling_lib_glsl[]; -extern char datatoc_lightprobe_geom_glsl[]; -extern char datatoc_lightprobe_vert_glsl[]; - static struct GPUTexture *create_ggx_lut_texture(int UNUSED(w), int UNUSED(h)) { struct GPUTexture *tex; @@ -47,16 +40,8 @@ static struct GPUTexture *create_ggx_lut_texture(int UNUSED(w), int UNUSED(h)) static float samples_len = 8192.0f; static float inv_samples_len = 1.0f / 8192.0f; - DRWShaderLibrary *lib = EEVEE_shader_lib_get(); - - struct GPUShader *sh = DRW_shader_create_with_shaderlib(datatoc_lightprobe_vert_glsl, - datatoc_lightprobe_geom_glsl, - datatoc_bsdf_lut_frag_glsl, - lib, - "#define HAMMERSLEY_SIZE 8192\n"); - DRWPass *pass = DRW_pass_create("LightProbe Filtering", DRW_STATE_WRITE_COLOR); - DRWShadingGroup *grp = DRW_shgroup_create(sh, pass); + DRWShadingGroup *grp = DRW_shgroup_create(EEVEE_shaders_ggx_lut_sh_get(), pass); DRW_shgroup_uniform_float(grp, "sampleCount", &samples_len, 1); DRW_shgroup_uniform_float(grp, "invSampleCount", &inv_samples_len, 1); DRW_shgroup_uniform_texture(grp, "texHammersley", e_data.hammersley); @@ -105,13 +90,8 @@ static struct GPUTexture *create_ggx_refraction_lut_texture(int w, int h) static float a2 = 0.0f; static float inv_samples_len = 1.0f / 8192.0f; - DRWShaderLibrary *lib = EEVEE_shader_lib_get(); - - struct GPUShader *sh = DRW_shader_create_fullscreen_with_shaderlib( - datatoc_btdf_lut_frag_glsl, lib, "#define HAMMERSLEY_SIZE 8192\n"); - DRWPass *pass = DRW_pass_create("LightProbe Filtering", DRW_STATE_WRITE_COLOR); - DRWShadingGroup *grp = DRW_shgroup_create(sh, pass); + DRWShadingGroup *grp = DRW_shgroup_create(EEVEE_shaders_ggx_refraction_lut_sh_get(), pass); DRW_shgroup_uniform_float(grp, "a2", &a2, 1); DRW_shgroup_uniform_float(grp, "sampleCount", &samples_len, 1); DRW_shgroup_uniform_float(grp, "invSampleCount", &inv_samples_len, 1); |