Differential D13910 Diff 47377 source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl
| #pragma BLENDER_REQUIRE(common_math_lib.glsl) | #pragma BLENDER_REQUIRE(common_math_lib.glsl) | ||||
| #pragma BLENDER_REQUIRE(common_view_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) | #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() | float phase_function_isotropic() | ||||
| { | { | ||||
| return 1.0 / (4.0 * M_PI); | return 1.0 / (4.0 * M_PI); | ||||
| } | } | ||||
| float line_unit_box_intersect_dist(vec3 lineorigin, vec3 linedirection) | float line_unit_box_intersect_dist(vec3 lineorigin, vec3 linedirection) | ||||
| { | { | ||||
| /* https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/ | /* https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/ | ||||
| ▲ Show 20 Lines • Show All 269 Lines • Show Last 20 Lines | |||||