Page 1 of 1

cubemap support ?

Posted: Tue Feb 21, 2017 12:12 pm
by logoliv
Hi all,

Will Löve 0.11 support cubemaps ? or perhaps does it already support them ?
When I write the function textureCube with samplerCube as uniform variable (or texture3D with sampler3D), I don't have an error... just a black background

Re: cubemap support ?

Posted: Tue Feb 21, 2017 12:15 pm
by slime
logoliv wrote: Tue Feb 21, 2017 12:12 pmWill Löve 0.11 support cubemaps ?
Yes. https://bitbucket.org/rude/love/commits ... 3561a365d5

Re: cubemap support ?

Posted: Tue Feb 21, 2017 1:01 pm
by kikito
Oh, and I see that Volume Textures are coming too. I'm already thinking about applications for those :)

Re: cubemap support ?

Posted: Tue Feb 21, 2017 6:28 pm
by Jasoco
Hang on. Someone explain what this is. Because it sounds interesting.

Re: cubemap support ?

Posted: Tue Feb 21, 2017 6:37 pm
by s-ol
Jasoco wrote: Tue Feb 21, 2017 6:28 pm Hang on. Someone explain what this is. Because it sounds interesting.
Basically these are other texture sampler types.

Your default texture samples using two coorsinates (uv). A volume texture is basically a stack of 2d textures that you sample with a 3d vector. I guess it interpolates along all axes too.

A cubemap is also sampled using a 3d vector, but it is interpreted differently and is made up of 6 seperate 2d textures instead of N (?). Each is a side of a cube and the unit sampling vector is projected onto the cubes inner surface from it's center. You may know this sort of approach from old skyboxes (quake?).

Re: cubemap support ?

Posted: Tue Feb 21, 2017 7:09 pm
by Positive07
That means (If I'm not mistaken since I have no experience with all this) that in your mesh you can use u, v, w coordinates where w is either an interpolated value of the N different images (In case of volume texture) or one of the 6 textures of a cubemap.

This allows you to do some tricks when texturing stuff

Re: cubemap support ?

Posted: Wed Feb 22, 2017 12:56 am
by raidho36
It allows using 3d sprites (i.e. voxels) of you use clever sampling shader, or volumetric rendering in general. Their other common use is tonemapping. They're to go choice for densely storing any data in 3 dimensions. The cubemaps are used for reflections and skyboxes, their defining feature is ability to capture scenery 360 degrees around in a single texture.

Re: cubemap support ?

Posted: Wed Feb 22, 2017 1:01 am
by slime
Array Textures are the most generally useful ones added with that commit, for 2D games: https://bitbucket.org/rude/love/issues/ ... y-textures