Search found 4 matches

by LinusNeuman
Fri Oct 30, 2015 9:39 am
Forum: Support and Development
Topic: vec3 modulus error
Replies: 1
Views: 1440

Re: vec3 modulus error

Turns out that time was 0 all the time, so now I send time every frame. I also deleted the error statement and replaced with this: float noise(vec2 seed) { float x = (seed.x / 3.14159 + 4) * (seed.y / 13 + 4) * ((fract(time) + 1) * 10); return mod((mod(x, 13) + 1) * (mod(x, 123) + 1), 0.01) - 0.005;...
by LinusNeuman
Fri Oct 30, 2015 9:11 am
Forum: Support and Development
Topic: vec3 modulus error
Replies: 1
Views: 1440

vec3 modulus error

Hello! I tried converting this shader I found to love2d, but I can't get it right. This statement is the one in error: vec3 grain = vec3(((mod(mod(int(x), 13) + 1)* (mod(int(x), 123) + 1), 0.01) - 0.005) * noiseStrength); // 0.01 and - 0.005 Unable to find compatible overloaded function "mod(fl...
by LinusNeuman
Mon Oct 26, 2015 11:25 am
Forum: Support and Development
Topic: Help with Hotline Miami Shader
Replies: 2
Views: 2737

Re: Help with Hotline Miami Shader

How are you using your shader? It cannot work on primitives, it only works with a texture. Therefore you need to render everything to a canvas, then draw that canvas to the screen using the shader. Here's a working example: shader = love.graphics.newShader([[ extern number aberration; vec4 effect(v...
by LinusNeuman
Mon Sep 28, 2015 10:44 am
Forum: Support and Development
Topic: Help with Hotline Miami Shader
Replies: 2
Views: 2737

Help with Hotline Miami Shader

Hello! I am trying to make a new shader that splits up R-, G-, and B-channels into separate layers that converge, which will create an old-vcr-feel to it, like Hotline Miami has done. The problem is that Lua Shader coding is very unintuitive. This is the code I found in the Unity forums for a GLSL s...