Skip to content

CubeMap support#537

Merged
RobDangerous merged 3 commits intoKode:masterfrom
luboslenco:master
Mar 19, 2017
Merged

CubeMap support#537
RobDangerous merged 3 commits intoKode:masterfrom
luboslenco:master

Conversation

@luboslenco
Copy link
Copy Markdown
Contributor

@luboslenco luboslenco commented Mar 18, 2017

Adds support for handling cubemaps. As usual, took a bit longer than anticipated.

  • CubeMap class works exactly like Image class
  • WebGL is ready, will also do Kore/Krom
  • Tested & working, some PR typos or minor issues can arise though
  • Only render target functionality implemented so far
// Creating a cubemap
var cubemap = CubeMap.createRenderTarget(...);

// Render to cubemap using layered rendering
// Draw to all faces at once using geometry shader
// WebGL is not capable of this
cubemap.g4.begin();

// Render to desired face
// 0: x+, 1: x-, 2: y+, 3: y-, 4: z+, 5: z-
cubemap.g4.beginFace(face);

// Attach cubemap to samplerCube unit
g4.setCubeMap(cubemap);

// Attach cubemap depth buffer to samplerCube unit
g4.setCubeMapDepth(cubemap);

@RobDangerous RobDangerous merged commit 1f8dff2 into Kode:master Mar 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants