Ref wrote:Try the attached demo (just something I stuck together from your code.).
The left image is created with bloom.
I think that this is the effect your are attempting???
Nope, I don't think so. Here's what it looks like for me:
Just to be clear, the shader script I'm using is slime's, and, according to his example, should result in something like this:
I've written a little raytracer from scratch. It's not perfect and has some bugs like the shadow projection on the mirrored material, but I'm pretty happy with the result .
Controls:
W = Forward
S = Backward
A = Left Side
D = Right Side
B = Down
N = Up
Escape = exit the program
I've written a little raytracer from scratch. It's not perfect and has some bugs like the shadow projection on the mirrored material, but I'm pretty happy with the result .
Controls:
W = Forward
S = Backward
A = Left Side
D = Right Side
B = Down
N = Up
Escape = exit the program
Im getting an error as well.
graphics.lua:1346: Cannot get location of shader variable `light.direction'.
Acommon error is to define but not use the variable.
traceback
[C]: in function 'sendFloat'
graphics.lua:1346: in function 'send'
main.lua:102 in function 'update'
[C]: in function 'xpcall'
Edit: commenting out line 102 in main.lua allows it to run but im not sure the effect is the same.
Ok that was my error forget to comment out the light direction but for some reasons the code still run with it .... Here's the (hopefully) fixed version.
The yellow ball has reflections inside out, but other than that it's an "okay". I don't honestly understand why lövers are so obsessed with 3d and particularry with raytracing.