I'm blind and stupid, and Alex 'voder' just pointed out to me that you
can set the format to 32 bits per pixel in the render to image
settings in the format dropdown ...
doh!
Memo (Mehmet S. Akten)
www.memo.tv
[EMAIL PROTECTED]
+44 (0) 7958 783 832
+44 (0) 20 8123 9986
29 Ironworks
Dace Rd
London E3 2NX, UK
On 17 Jun 2008, at 14:25, Memo Akten wrote:
HI Christopher, thanks for the reply, and sorry I should have been
more specific (about the passing on information).
I'm writing fragment shaders to calculate stuff and store
information (porting a fluid simulation I'd written in C (based on
the famous Jos Stam paper) to GLSL - with the help of some Cg from
gpgpu.com), then I want to feed these into other fragment shaders -
so they will be glorified functions / lookup tables - and show
various states of the fluid (velocity, pressure, curl etc.). When I
use texture2D(sampler2DName, vec2Coordinates), the values come in as
normalized floats, and when I output in my fragment shader
gl_FragColor=vec4(...), again it takes in normalized float values -
but then as soon as its written to the frame buffer internally it
gets converted to an 8bit integer (I'm sure you know this already).
So when I 'render in image' and get that output image, it has been
quantized to 256 levels - that is what I'm trying to avoid. Ideally
the 'render in image' patch would have the option of rendering to a
float texture - but of course it doesn't - but I don't know enough
about the internal workings of QC (or opengl) to know if a custom
'render in image' can be written which does render to a float
texture....
Memo (Mehmet S. Akten)
www.memo.tv
[EMAIL PROTECTED]
On 17 Jun 2008, at 13:55, Christopher Wright wrote:
Hi all, is it possible to setup QC to use float textures? I want
to create a few GLSL shaders that input and output float textures
but couldn't find anywhere to set it up...
In leopard, float textures are supported when the video card
supports them I think. GLSL doesn't output textures, but it'll use
the textures you provide for input. CoreImage filters handle float
textures just fine, as far as I've been able to tell. Ultimately,
it depends on the context that's provided to QC. In the QC app
itself, I don't think the context is floating point, but in
external apps it possibly could be.
also I'd like to use the output of some GLSL shaders as inputs to
other GLSL shaders, so currently i'm doing a render in image for
the shaders and connecting them up, is this the best (if not only)
way to do this?
That depends on what you mean by "output" -- GLSL shaders currently
perform 2 operations: Vertex transformation and fragment
generation. When you feel a render-in-image into a GLSL patch (as
a texture), you're just feeding the fragment part back through. If
that's all you need to accomplish what you're interested in doing,
then that's perfectly fine -- it's currently the only way to do
it. If you need to pass transformed vertices through another
Vertex Shader though, you're out of luck for the time being:
there's no provision for transformation feedback in GLSL in QC yet.
--
[ christopher wright ]
[EMAIL PROTECTED]
http://kineme.net/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected]
)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/memo%40memo.tv
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]