And the exact same code (with the relevant name changes) works exactly as expected in 0.8.0? Does print(gradient:getWarnings()) output anything? Does it work if you separate the width and height variable declarations, like:
gradient:getWarnings()) returns 'no errors' and separating width & height in the shader had no effect.
In version 0.9 do you get yellow triangles or shaded triangle (concerned that something is off on my computer).
Darn!
Looks like I'm going to be aced out of version 0.9.0
Everything OK on 0.8
Don't know where to go from here.
Edit: If I replace the width & height in the shader with 512, then I get the shaded triangles that Slime sees and I get with version 0.8.
Sooo!, the problem I'm having is definitely with shader:send & extern float width, height in version 0.9!
With reference to Love2d Version 0.9:
BUGFIXES
"Fixed Shader:send with Images and Canvases failing sometimes."
Might have to revisit this topic again!
I have a similiar problem with morphing.
'Shader:send' just doesn't work for me on 0.9 (but does on 0.8).
What video card do you have? Are your drivers up to date? What OS? Does shader:sendFloat("width", 512) work? Does shader:send silently fail for all types of variables (images, numbers, vectors, etc) or just numbers?
slime wrote:What video card do you have? Are your drivers up to date? What OS? Does shader:sendFloat("width", 512) work? Does shader:send silently fail for all types of variables (images, numbers, vectors, etc) or just numbers?
I have an Aspire 4730z laptop with the Mobile Intel(R) series 4 Express chip set (if that helps).
Drivers last updated January.
All pixelEffects work fine on version 8.0 of Love.
shader:send and shader:sendFloat both fail silently with both numbers& images in version 0.9 of Love but work fine if manually entered into the shader.
Jumped the gun!
Was running Love 0.9 build 130403.
Boolsheet's build doesn't have the problem - so, all's well.
Thanks Slime for your help.
Should learn to wait for the formal release but was eager to see what 0.9 had to offer and what needed to be changed from 0.8.
Best
Still playing with GLSL shaders.
Try to figure out how they work (slow learner).
One of the big problems for me is the non-‘kikito’ coding style.
Most troubling for me:
FORMAT: no use of ‘sp’ or ‘tab’ – even though permissible
VARIABLE NAMES: short, barely descriptive names (often single character)
MAGIC NUMBERS: 5.0929581 = 5 but 2.0 ~= 2.01
TIME: externally supplied time variable continually increases but shader stays inbounds
RETURN: nameless vec4 returned
SUBSCRIPTING: resolution.x = resolution[0] even though externally supplied vec2 = {400,400}
COMMENTS: rarely used
Y AXES: Love use of inverted y axes
ARRAYS: start at zero
Question: Does the number of characters in a shader effect execution speed or memory use?
Demos below are Love conversions of shaders found on the web (e.g. GSGL sandbox) – nothing new, just conversions with minor experimental changes.
Lots of luck at figuring out what’s in the shader.