diff options
Diffstat (limited to 'hello_obj2.lc')
-rw-r--r-- | hello_obj2.lc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hello_obj2.lc b/hello_obj2.lc index d0fc35b..52d4a52 100644 --- a/hello_obj2.lc +++ b/hello_obj2.lc | |||
@@ -7,7 +7,9 @@ blendplane = -- NoBlending -- BlendLogicOp Xor | |||
7 | ((OneBF,SrcAlpha),(DstAlpha,DstAlpha)) | 7 | ((OneBF,SrcAlpha),(DstAlpha,DstAlpha)) |
8 | (V4 0 0 0 0) | 8 | (V4 0 0 0 0) |
9 | 9 | ||
10 | makeFrame (cameraPosition :: Vec 3 Float) | 10 | makeFrame (cubemap :: Texture) |
11 | (skybox :: PrimitiveStream Triangle ((Vec 3 Float))) | ||
12 | (cameraPosition :: Vec 3 Float) | ||
11 | (cam :: Mat 4 4 Float) | 13 | (cam :: Mat 4 4 Float) |
12 | (color :: Vec 4 Float) | 14 | (color :: Vec 4 Float) |
13 | (texture :: Texture) | 15 | (texture :: Texture) |
@@ -30,9 +32,12 @@ makeFrame (cameraPosition :: Vec 3 Float) | |||
30 | in ((r + V4 0 0 0 (0.8)))) | 32 | in ((r + V4 0 0 0 (0.8)))) |
31 | & accumulateWith (DepthOp Less True, ColorOp blendplane (V4 True True True True)) | 33 | & accumulateWith (DepthOp Less True, ColorOp blendplane (V4 True True True True)) |
32 | 34 | ||
35 | textureCubeSlot s = Texture2DSlot s | ||
33 | 36 | ||
34 | main = renderFrame $ | 37 | main = renderFrame $ |
35 | makeFrame (Uniform "CameraPosition") | 38 | makeFrame (textureCubeSlot "CubeMap") |
39 | (fetch "SkyCube" ((Attribute "position"))) | ||
40 | (Uniform "CameraPosition") | ||
36 | (Uniform "ViewProjection") | 41 | (Uniform "ViewProjection") |
37 | (Uniform "diffuseColor") | 42 | (Uniform "diffuseColor") |
38 | (Texture2DSlot "diffuseTexture") | 43 | (Texture2DSlot "diffuseTexture") |