Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/shaders/volumetric_frag.glsl
| Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | |||||
| vec2 attr_load_vec2(sampler3D tex) | vec2 attr_load_vec2(sampler3D tex) | ||||
| { | { | ||||
| return texture(tex, grid_coordinates()).rg; | return texture(tex, grid_coordinates()).rg; | ||||
| } | } | ||||
| float attr_load_float(sampler3D tex) | float attr_load_float(sampler3D tex) | ||||
| { | { | ||||
| return texture(tex, grid_coordinates()).r; | return texture(tex, grid_coordinates()).r; | ||||
| } | } | ||||
| vec4 attr_load_color(sampler3D tex) | |||||
| { | |||||
| return texture(tex, grid_coordinates()); | |||||
| } | |||||
| vec3 attr_load_uv(sampler3D attr) | |||||
| { | |||||
| attr_id += 1; | |||||
| return vec3(0); | |||||
| } | |||||
| /* TODO(@fclem): These implementation details should concern the DRWManager and not be a fix on | /* TODO(@fclem): These implementation details should concern the DRWManager and not be a fix on | ||||
| * the engine side. But as of now, the engines are reponsible for loading the attributes. */ | * the engine side. But as of now, the engines are reponsible for loading the attributes. */ | ||||
| float attr_load_temperature_post(float attr) | float attr_load_temperature_post(float attr) | ||||
| { | { | ||||
| #ifdef MESH_SHADER | #ifdef MESH_SHADER | ||||
| /* Bring the into standard range without having to modify the grid values */ | /* Bring the into standard range without having to modify the grid values */ | ||||
| attr = (attr > 0.01) ? (attr * drw_volume.temperature_mul + drw_volume.temperature_bias) : 0.0; | attr = (attr > 0.01) ? (attr * drw_volume.temperature_mul + drw_volume.temperature_bias) : 0.0; | ||||
| Show All 13 Lines | |||||