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

lightprobe_planar_display_frag.glsl « shaders « eevee « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 655cc626bbaaa589b228e96c2d74565f0425187d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

uniform mat4 ViewProjectionMatrix;
uniform sampler2DArray probePlanars;

in vec3 worldPosition;
flat in int probeIdx;

out vec4 FragColor;

void main()
{
	vec4 refco = ViewProjectionMatrix * vec4(worldPosition, 1.0);
	refco.xy /= refco.w;
	FragColor = vec4(textureLod(probePlanars, vec3(refco.xy * 0.5 + 0.5, float(probeIdx)), 0.0).rgb, 1.0);
}