Search found 6 matches

by keprast
Thu May 16, 2019 3:33 pm
Forum: Games and Creations
Topic: A Shader Que.
Replies: 12
Views: 10465

Re: A Shader Que.

Just add this at the beginning of your code: do local mt = debug.getregistry().Shader local old_send = mt.send mt.send = function (shader, variable, ...) pcall(old_send, shader, variable, ...) end end This should be the default behaviour, but the LÖVE developers don't seem to agree. Thank you, the ...
by keprast
Thu May 16, 2019 1:15 pm
Forum: Games and Creations
Topic: A Shader Que.
Replies: 12
Views: 10465

Re: A Shader Que.

grump wrote: Thu May 16, 2019 11:05 am You have to actually use the variable in the shader. Not just declare it. It has to be referenced somewhere in the shader code, or else the shader compiler will remove it.

Please use the Support subforum for future help requests.
error:
assign:I-value required “time”(can’t modfiy a unifrom )
by keprast
Thu May 16, 2019 10:32 am
Forum: Games and Creations
Topic: A Shader Que.
Replies: 12
Views: 10465

Re: A Shader Que.

raidho36 wrote: Thu May 16, 2019 5:24 am You never used the variable in the code so it got pruned away during shader compilation. After that, you're trying to use it but it doesn't exist.
I think that's wrong, obviously I need an init value to maintain this variable, right?
in love.load?
by keprast
Thu May 16, 2019 9:55 am
Forum: Games and Creations
Topic: A Shader Que.
Replies: 12
Views: 10465

Re: A Shader Que.

raidho36 wrote: Thu May 16, 2019 5:24 am You never used the variable in the code so it got pruned away during shader compilation. After that, you're trying to use it but it doesn't exist.
So I should write code like that, right?
extern number time = 0;
by keprast
Thu May 16, 2019 2:29 am
Forum: Games and Creations
Topic: A Shader Que.
Replies: 12
Views: 10465

A Shader Que.

hi,guy. :)

There is a problem with pixel shaders.
I code extern number time,
I called the function shader: send (“time”,x) to send the value.

error:
a common error is not define but not use the variable. :|
why?
by keprast
Wed Apr 17, 2019 8:10 am
Forum: General
Topic: A hot potato
Replies: 4
Views: 11842

A hot potato

Hi, everyone. This is the new guy. :)

I have a question.
I tried to move a Sprite using a keyboard button and then draw it using the draw function.
Finally, my Sprite won't move. I have to keep clicking on the keyboard button to move it. :|
Why? :shock: