Fix T99528: EEVEE: Regression: Faulty shaders when using Volume Info node
Workaround the issue by adding an intermediate function. This is usually the case when working with attributes. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D15860
This commit is contained in:
committed by
Clément Foucault
parent
de818d81c3
commit
874e9cbab9
@@ -12,6 +12,16 @@ void node_attribute_temperature(vec4 attr, out vec4 out_attr)
|
||||
out_attr.w = 1.0;
|
||||
}
|
||||
|
||||
void node_attribute_density(vec4 attr, out float out_attr)
|
||||
{
|
||||
out_attr = attr.x;
|
||||
}
|
||||
|
||||
void node_attribute_flame(vec4 attr, out float out_attr)
|
||||
{
|
||||
out_attr = attr.x;
|
||||
}
|
||||
|
||||
void node_attribute(
|
||||
vec4 attr, out vec4 outcol, out vec3 outvec, out float outf, out float outalpha)
|
||||
{
|
||||
|
||||
@@ -25,9 +25,11 @@ static int node_shader_gpu_volume_info(GPUMaterial *mat,
|
||||
}
|
||||
if (out[1].hasoutput) {
|
||||
out[1].link = GPU_attribute(mat, CD_AUTO_FROM_NAME, "density");
|
||||
GPU_link(mat, "node_attribute_density", out[1].link, &out[1].link);
|
||||
}
|
||||
if (out[2].hasoutput) {
|
||||
out[2].link = GPU_attribute(mat, CD_AUTO_FROM_NAME, "flame");
|
||||
GPU_link(mat, "node_attribute_flame", out[2].link, &out[2].link);
|
||||
}
|
||||
if (out[3].hasoutput) {
|
||||
out[3].link = GPU_attribute(mat, CD_AUTO_FROM_NAME, "temperature");
|
||||
|
||||
Reference in New Issue
Block a user