cubemap support ?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
logoliv
Prole
Posts: 29
Joined: Mon Jan 27, 2014 3:05 pm

cubemap support ?

Post 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
User avatar
slime
Solid Snayke
Posts: 3163
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: cubemap support ?

Post 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
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: cubemap support ?

Post by kikito »

Oh, and I see that Volume Textures are coming too. I'm already thinking about applications for those :)
When I write def I mean function.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: cubemap support ?

Post by Jasoco »

Hang on. Someone explain what this is. Because it sounds interesting.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: cubemap support ?

Post 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?).

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: cubemap support ?

Post 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
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: cubemap support ?

Post 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.
User avatar
slime
Solid Snayke
Posts: 3163
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: cubemap support ?

Post 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
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 7 guests