Page 1 of 1
Cubemap?
Posted: Wed Jun 08, 2022 7:18 am
by VilleK
Someone on FL Studio forums asked how to use a cubemap in ZGE. I remember seeing this but when I search the ZGE forums I only find mentions of it but no project. Maybe Kjell happen to have an example lying around?
Re: Cubemap?
Posted: Wed Jun 08, 2022 10:31 am
by Kjell
Hej Ville,
VilleK wrote: ↑Wed Jun 08, 2022 7:18 amSomeone on FL Studio forums asked how to use a cubemap in ZGE. I remember seeing this but when I search the ZGE forums I only find mentions of it but no project.
Can't seem to find it either
VilleK wrote: ↑Wed Jun 08, 2022 7:18 amMaybe Kjell happen to have an example lying around?
Depends a little on what this person means with "cubemap".
- Creating a real OpenGL cube-map for use with OpenGL features or a samplerCube in a shader?
- Applying 6 individual images to a cube to create a sky-box / panorama-image ( a.k.a. fake cube-map )?
- Using a single horizontal-cross ( see below for example ) image for either a real of a fake cube-map?
Anyway, attached is a example of a real OpenGL cube-map generated from 6 individual Bitmap components ( and a quick & sloppy reflection demo ). It's a little clumsy, but there's no elegant way around it .. aside from adding a CubeMap component obviously
K
Re: Cubemap?
Posted: Wed Jun 08, 2022 11:39 am
by VilleK
That looks great, thanks!
Kjell wrote: ↑Wed Jun 08, 2022 10:31 am
Creating a real OpenGL cube-map for use with OpenGL features or a samplerCube in a shader?
Yes I think a samplerCube in a shader is the next step because the question mentioned this shader:
https://www.shadertoy.com/view/Wl3fWX
I will reply to the user and ask for more details. It is in a private forum so cannot post the link here.