/usr/share/obs/libobs/solid.effect is in libobs0 21.0.2+dfsg1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | uniform float4x4 ViewProj;
uniform float4 color = {1.0, 1.0, 1.0, 1.0};
uniform float4 randomvals1;
uniform float4 randomvals2;
uniform float4 randomvals3;
struct SolidVertInOut {
float4 pos : POSITION;
};
SolidVertInOut VSSolid(SolidVertInOut vert_in)
{
SolidVertInOut vert_out;
vert_out.pos = mul(float4(vert_in.pos.xyz, 1.0), ViewProj);
return vert_out;
}
float4 PSSolid(SolidVertInOut vert_in) : TARGET
{
return color;
}
float rand(float4 pos, float4 rand_vals)
{
return 0.5 + 0.5 * frac(sin(dot(pos.xy, float2(rand_vals.x, rand_vals.y))) * rand_vals.z);
}
float4 PSRandom(SolidVertInOut vert_in) : TARGET
{
return float4(rand(vert_in.pos, randomvals1),
rand(vert_in.pos, randomvals2),
rand(vert_in.pos, randomvals3),
1.0);
}
struct SolidColoredVertInOut {
float4 pos : POSITION;
float4 color : COLOR;
};
SolidColoredVertInOut VSSolidColored(SolidColoredVertInOut vert_in)
{
SolidColoredVertInOut vert_out;
vert_out.pos = mul(float4(vert_in.pos.xyz, 1.0), ViewProj);
vert_out.color = vert_in.color;
return vert_out;
}
float4 PSSolidColored(SolidColoredVertInOut vert_in) : TARGET
{
return vert_in.color * color;
}
technique Solid
{
pass
{
vertex_shader = VSSolid(vert_in);
pixel_shader = PSSolid(vert_in);
}
}
technique SolidColored
{
pass
{
vertex_shader = VSSolidColored(vert_in);
pixel_shader = PSSolidColored(vert_in);
}
}
technique Random
{
pass
{
vertex_shader = VSSolid(vert_in);
pixel_shader = PSRandom(vert_in);
}
}
|