Enhance video texture handling and add release build configurations
This commit is contained in:
@@ -6,8 +6,6 @@ effect = nil
|
||||
|
||||
function _create()
|
||||
local fxSrc = [[
|
||||
in vec2 vPosition;
|
||||
|
||||
#define time uTime
|
||||
|
||||
mat2 mm2(in float a){float c = cos(a), s = sin(a);return mat2(c,s,-s,c);}
|
||||
|
||||
@@ -13,8 +13,6 @@ function _create()
|
||||
rockTexture:GenerateMipmaps()
|
||||
|
||||
local fxSrc = [[
|
||||
in vec2 vPosition;
|
||||
|
||||
uniform sampler2D iChannel0;
|
||||
|
||||
#define FAR 80.
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
effect = nil
|
||||
|
||||
function _create()
|
||||
local fxSrc = [[in vec2 vPosition;
|
||||
|
||||
local fxSrc = [[
|
||||
void main() {
|
||||
vec2 uv = vPosition * 0.5 + 0.5;
|
||||
FragColor = vec4(uv, 0.5 + 0.5 * sin(uTime), 1.0);
|
||||
|
||||
@@ -5,8 +5,6 @@ effect = nil
|
||||
|
||||
function _create()
|
||||
local fxSrc = [[
|
||||
in vec2 vPosition;
|
||||
|
||||
const bool USE_MOUSE = false;
|
||||
|
||||
const float PI = 3.14159265;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user