samplerCube

Is the shader uniform “samplerCube” supported and how do you assign a value to it? I get a black screen when I try…

Thanks!

I have the same, but there is an example and try to understand it

I don’t think cube maps are supported by the current Codea Mesh/ shader API. My understanding is that they are normally created by overloading a SamplerCube buffer with 6 images, I don’t think you can do this in Codea. If you’d like to see it added, you can create feature request tickets in the issue tracker (link above). We just got lots of new shader functions in Codea 2.5.3 which I’d created request tickets for, such as instancing, GLES 3.0, uniform matrix arrays and matrix vertex attributes, so you never know, the update gods may smile on you.

I have the same, but there is an example and try to understand it

@TokOut , there aren’t any examples of SamplerCube in Codea.

@yojimbo2000 I meant examples for shaders

@TokOut - there is no example for tihs

I don’t know why you bothered posting, you don’t know how to use shaders. Leave it to the experts to answer the question.

Thanks for the answers! (:

What did you plan on using it for, a skybox?

@Ignatz, how to use shaders?

@TokOut -

  1. Learn to program Lua

  2. Learn to program graphics in Codea

  3. Learn shaders

Start at step 1

@yojimbo2000 I was going to implement a global illumination renderer using radiosity. I needed to render the scene into a cubemap for every n:th pixel on screen and interpolate. But since its not supported yet, I will do some path tracing instead and try to make it real time (:

I’ve created a ticket for this feature request:

https://bitbucket.org/TwoLivesLeft/core/issues/389/support-for-samplercube-in-shaders

I’d use it for creating pseudo- reflective-surfaced objects (ie without raytracing).

Shaders are one of the best supported areas in Codea (better even than a lot of pro desktop-class IDEs as far as I can tell), but the more areas of the feature-set they support, the better. I reckon.

If you love shaders, please up-vote the above ticket.

On the subject of shader features, I’ve also created a feature request for the Open GL over-ride of face-culling, which is needed for created objects with translucent areas (without having random rear-facing fragments getting culled):

https://bitbucket.org/TwoLivesLeft/core/issues/390/support-for-disabling-face-culling-in