Hey,
So after playing around with the Advanced Lighting examples and starting to kid myself I actually understand how it works, I started a project with AL, just something small to see if I could get it to work.
I thought I'd start off with a road, and see if I could get that working. That's where I'm stuck :/
Here's my code so far:
Rem Project: Advanced Lighting Project
Rem Created: Friday, August 09, 2013
Rem ***** Main Source File *****
#include "include/advanced lighting.dba"
set display mode 1024, 768, 32
advlighting_setup(1024, 768)
AdvLighting_SetCamera(1,16000,75,1024/768)
AdvLighting_SetFog(16000,0,0,0,2)
AdvLighting_SetAmbient(130,50,50)
sync on : sync rate 0
autocam off
backdrop off
load effect "shaders\surface\object\parallax occlusion.fx", 1, 0
effect_add(1)
loadstreet()
do
if upkey() = 1 then move camera 0.3
if downkey() = 1 then move camera -0.3
rotate camera camera angle x() + mousemovey() / 4, camera angle y() + mousemovex() / 4, camera angle z()
advlighting_update()
sync mask (2^0)
sync
loop
function loadstreet()
set ambient light 80
load image "road.jpg", 1
load image "road_Normal.jpg", 2
load image "road_disp.png", 3
make object plain 1, 400, 3000, 20, 20
object_add(1)
object_setautoupdate(1, 1)
scale object texture 1, 1, 5
set object effect 1, 1
texture object 1, 0, 1
texture object 1, 1, 2
rem texture object 1, 2, 3
Sky_Create()
Sky_SetDynamic(1)
Sky_SetColor1(255,255,255)
Sky_SetColor2(255,255,255)
endfunction
Here are the images I'm using
road.jpg:
road_Normal.jpg:
road_disp.png: (As you can see from the code, I tried not using this one)
Basically, the problem I'm having is I'm not getting any depth at all on the road :/
It just looks like an ordinary DBPro object, there's no visible parallax mapping on it.
Any ideas on what's wrong?
Thanks