Enhance video texture handling and add release build configurations
This commit is contained in:
@@ -2,16 +2,22 @@ effect = nil
|
||||
video = nil
|
||||
|
||||
function _create()
|
||||
video = Texture.FromGStreamer("filesrc location=/media/diego/Data/Projects/live-wallpaper/samples/video.mp4")
|
||||
video = Texture.FromGStreamer("filesrc location=" .. Resolve("sunset.mkv"))
|
||||
|
||||
local fxSrc = [[in vec2 vPosition;
|
||||
|
||||
uniform sampler2D uTexture;
|
||||
local fxSrc = [[uniform sampler2D uTexture;
|
||||
|
||||
void main() {
|
||||
vec2 uv = vPosition * 0.5 + 0.5;
|
||||
uv.y = 1.0 - uv.y;
|
||||
FragColor = texture(uTexture, uv);
|
||||
vec2 uv = vUV;
|
||||
|
||||
for (int i = 0; i < uNumDisplays; i++) {
|
||||
vec4 displayNorm = uDisplayNorm[i];
|
||||
|
||||
if (vUV.x >= displayNorm.x && vUV.x <= displayNorm.x + displayNorm.z &&
|
||||
vUV.y >= displayNorm.y && vUV.y <= displayNorm.y + displayNorm.w) {
|
||||
FragColor = texture(uTexture, GetDisplayUV(uTexture, i));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
]]
|
||||
effect = Effect.new(fxSrc)
|
||||
|
||||
Reference in New Issue
Block a user