So in my 3D project, I used “scene.fogEnabled = true” and I did near param, far param and fog color. But when I press play, it comes up saying that it failed to compile the shader, and not only that but there a ton of warnings and errors. Is this intentionally have I done something wrong in my code??
function setup()
assert(OrbitViewer, "Please include Cameras (not Camera) as a dependency")
scene = craft.scene()
scene.fogEnabled = true
scene.fogNear = 50
scene.fogFar = 10
scene.fogColor = color(255)
v=scene.camera:add(OrbitViewer, vec3(0,0,0), 100, 0, 200)
createRect()
end
function draw()
update(DeltaTime)
scene:draw()
end
function update(dt)
scene:update(dt)
end
function createRect()
c1=scene:entity()
w=c1:add(craft.rigidbody,STATIC)
c1.position=vec3(0,0,0)
c1.model = craft.model.cube(vec3(10,10,10))
c1:add(craft.shape.model,c1.model)
c1.material = craft.material(asset.builtin.Materials.Standard)
c1.material.map = readImage(asset.builtin.Blocks.Trunk_White_Top)
end