Hello
Here is a 2 channel mixer using overlay blend mode with GLSL. This
works, is decently fast and gives me the expected result.
If you want more blend modes, feel free to grab them from http://001.vade.info
(or elsewhere, most are trivial to figure out)- the glsl shaders for
the mixers use the same subroutine layout in the glsl, so it is
trivial to swap. I did not include them out of sheer laziness.
Caveats with PD 0.4.03 Extended nightly from Dec 24th (Mac OS X
10.5.1, QT 7.3, Intel):
Only can use the texture dims from the zeroths texture unit.
texel mapped it seemed.
(0, destroy) and then re create it to see the textures assigned to
texture units.
this happened most often after closing and re-opening the patch.
Please see the included question(s) within the PD patch concerning
using framebuffer to grab the output of the rendered shader and send
it to yet another shader. Ive included an exposure shader in an
attempt to make a chain of GLSL effects. I however could not get
gemframebuffer to output any usable texture after using glslprogram.
Thanks, hope this is helpful to those out there
FUDDLE DUDDLE !@#!@#!@#()*!@#(*@#
:)
Nice, works for me. Is the idea that shaders are a efficient way of
mixing video?
.hc
On Dec 24, 2007, at 12:04 PM, vade wrote:
Hello
Here is a 2 channel mixer using overlay blend mode with GLSL. This
works, is decently fast and gives me the expected result.If you want more blend modes, feel free to grab them from http:// 001.vade.info (or elsewhere, most are trivial to figure out)- the
glsl shaders for the mixers use the same subroutine layout in the
glsl, so it is trivial to swap. I did not include them out of sheer
laziness.Caveats with PD 0.4.03 Extended nightly from Dec 24th (Mac OS X
10.5.1, QT 7.3, Intel):
- had to edit the GLSL program to fix multitexture coordinate
issue. Only can use the texture dims from the zeroths texture unit.
- could not get sampler2DRect working at all - only had a single
texel mapped it seemed.
- had weird issue where I would sometimes have to close the gemwin
(0, destroy) and then re create it to see the textures assigned to
texture units. this happened most often after closing and re-opening the patch.Please see the included question(s) within the PD patch concerning
using framebuffer to grab the output of the rendered shader and
send it to yet another shader. Ive included an exposure shader in
an attempt to make a chain of GLSL effects. I however could not get
gemframebuffer to output any usable texture after using glslprogram.Thanks, hope this is helpful to those out there
FUDDLE DUDDLE !@#!@#!@#()*!@#(*@#
:)
<GEM_glsl_2_channel_mixer.zip> _______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
Using ReBirth is like trying to play an 808 with a long stick. - David Zicarelli
Yes, very efficient, and also give you LOTS of flexibility . the
regular GL_BLEND_MODES do not offer that many variations (not many are
useful for video). Want to make a GPU powered chroma key - shader.
Want to make feedback but have FSAA on, probably shader :)
etc etc. Want to make 4 way mixer? shader! See where I am going here? :)
On Dec 24, 2007, at 3:29 PM, Hans-Christoph Steiner wrote:
Nice, works for me. Is the idea that shaders are a efficient way of
mixing video?.hc
On Dec 24, 2007, at 12:04 PM, vade wrote:
Hello
Here is a 2 channel mixer using overlay blend mode with GLSL. This
works, is decently fast and gives me the expected result.If you want more blend modes, feel free to grab them from http://001.vade.info (or elsewhere, most are trivial to figure out)- the glsl shaders
for the mixers use the same subroutine layout in the glsl, so it is
trivial to swap. I did not include them out of sheer laziness.Caveats with PD 0.4.03 Extended nightly from Dec 24th (Mac OS X
10.5.1, QT 7.3, Intel):
- had to edit the GLSL program to fix multitexture coordinate
issue. Only can use the texture dims from the zeroths texture unit.
- could not get sampler2DRect working at all - only had a single
texel mapped it seemed.
- had weird issue where I would sometimes have to close the gemwin
(0, destroy) and then re create it to see the textures assigned to
texture units. this happened most often after closing and re-opening the patch.Please see the included question(s) within the PD patch concerning
using framebuffer to grab the output of the rendered shader and
send it to yet another shader. Ive included an exposure shader in
an attempt to make a chain of GLSL effects. I however could not get
gemframebuffer to output any usable texture after using glslprogram.Thanks, hope this is helpful to those out there
FUDDLE DUDDLE !@#!@#!@#()*!@#(*@#
:)
<GEM_glsl_2_channel_mixer.zip> _______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Using ReBirth is like trying to play an 808 with a long stick. - David Zicarelli
very interesting, but also a good example on how to lock the computer
completely with gem - at least my old powerbook. i had to hard reset
because complete unresponsiveness. with [frame 10( it runs nicely
though. see my last post on how to avoid the lock-up.
max
Am 24.12.2007 um 21:35 schrieb vade:
Yes, very efficient, and also give you LOTS of flexibility . the regular GL_BLEND_MODES do not offer that many variations (not many are useful for video). Want to make a GPU powered chroma key - shader. Want to make feedback but have FSAA on, probably shader :) etc etc. Want to make 4 way mixer? shader! See where I am going
here? :)On Dec 24, 2007, at 3:29 PM, Hans-Christoph Steiner wrote:
Nice, works for me. Is the idea that shaders are a efficient way of mixing video?
.hc
On Dec 24, 2007, at 12:04 PM, vade wrote:
Hello
Here is a 2 channel mixer using overlay blend mode with GLSL. This works, is decently fast and gives me the expected result.
If you want more blend modes, feel free to grab them from http:// 001.vade.info (or elsewhere, most are trivial to figure out)- the glsl shaders for the mixers use the same subroutine layout in the glsl, so it is trivial to swap. I did not include them out of sheer laziness.
Caveats with PD 0.4.03 Extended nightly from Dec 24th (Mac OS X 10.5.1, QT 7.3, Intel):
- had to edit the GLSL program to fix multitexture coordinate
issue. Only can use the texture dims from the zeroths texture unit.
- could not get sampler2DRect working at all - only had a single
texel mapped it seemed.
- had weird issue where I would sometimes have to close the gemwin
(0, destroy) and then re create it to see the textures assigned to texture units. this happened most often after closing and re-opening the patch.
Please see the included question(s) within the PD patch concerning using framebuffer to grab the output of the rendered shader and send it to yet another shader. Ive included an exposure shader in an attempt to make a chain of GLSL effects. I however could not get gemframebuffer to output any usable texture after using glslprogram.
Thanks, hope this is helpful to those out there
FUDDLE DUDDLE !@#!@#!@#()*!@#(*@#
Hm. Interesting. GEM does not have a drop frame system? Im not sure
about the scheduler differences between PD and Max/Jitter, but most
Jitter events are in a different queue and have a drop frame handling
method built in to each object, and when drawing with openGL one
should use a 'qmetro', or a queue limited metro - to avoid such a
case. Im speaking a bit out of my realm of expertise but I dont really
think a Patcher should be able to do that, if it did indeed lock up
your system.
What is the proper way of handing this in PD/GEM? Sorry for causing a
crash. I saw your PD Jitter patch, but frankly I think some drop frame
system should be built into GEM to handle this automatically.
Anyway, what kind of powerbook? It may not have the required hardware
support for the shader, which might be why you are only getting 10fps,
via software fallback?
On Dec 25, 2007, at 1:04 PM, Max Neupert wrote:
very interesting, but also a good example on how to lock the computer completely with gem - at least my old powerbook. i had to hard reset because complete unresponsiveness. with [frame 10( it runs nicely though. see my last post on how to avoid the lock-up.
max
Am 24.12.2007 um 21:35 schrieb vade:
Yes, very efficient, and also give you LOTS of flexibility . the regular GL_BLEND_MODES do not offer that many variations (not many
are useful for video). Want to make a GPU powered chroma key - shader. Want to make feedback but have FSAA on, probably shader :) etc etc. Want to make 4 way mixer? shader! See where I am going here? :)On Dec 24, 2007, at 3:29 PM, Hans-Christoph Steiner wrote:
Nice, works for me. Is the idea that shaders are a efficient way of mixing video?
.hc
On Dec 24, 2007, at 12:04 PM, vade wrote:
Hello
Here is a 2 channel mixer using overlay blend mode with GLSL. This works, is decently fast and gives me the expected result.
If you want more blend modes, feel free to grab them from http:// 001.vade.info (or elsewhere, most are trivial to figure out)- the glsl shaders for the mixers use the same subroutine layout in the glsl, so it is trivial to swap. I did not include them out of sheer laziness.
Caveats with PD 0.4.03 Extended nightly from Dec 24th (Mac OS X 10.5.1, QT 7.3, Intel):
- had to edit the GLSL program to fix multitexture coordinate
issue. Only can use the texture dims from the zeroths texture unit.
- could not get sampler2DRect working at all - only had a single
texel mapped it seemed.
- had weird issue where I would sometimes have to close the gemwin
(0, destroy) and then re create it to see the textures assigned to texture units. this happened most often after closing and re-opening the patch.
Please see the included question(s) within the PD patch concerning using framebuffer to grab the output of the rendered shader and send it to yet another shader. Ive included an exposure shader in an attempt to make a chain of GLSL effects. I however could not get gemframebuffer to output any usable texture after using
glslprogram.Thanks, hope this is helpful to those out there
FUDDLE DUDDLE !@#!@#!@#()*!@#(*@#
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
vade wrote:
I think some drop frame
system should be built into GEM to handle this automatically.
Please make this feature optional, as non-realtime rendering synced to audio is a lot easier without auto-frame-dropping.
Of course :) Non realtime rendering would not have to evoke the drop
frame infrastructure at all :) for reference this works within Jitter,
so it ought to be possible.
On Dec 25, 2007, at 3:00 PM, Claude Heiland-Allen wrote:
vade wrote:
I think some drop frame system should be built into GEM to handle this automatically.
Please make this feature optional, as non-realtime rendering synced to audio is a lot easier without auto-frame-dropping.
Claude
http://claudiusmaximus.goto10.org
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Am 25.12.2007 um 20:53 schrieb vade:
What is the proper way of handing this in PD/GEM? Sorry for causing a crash. I saw your PD Jitter patch, but frankly I think some drop frame system should be built into GEM to handle this automatically.
maybe, i guess it's arguably if that's a feature or a bug. or like
matju described it recently: its more convenient just to call it a
feature.
Anyway, what kind of powerbook? It may not have the required hardware support for the shader, which might be why you are only getting 10fps, via software fallback?
no i don't think it's software fallback, it's just slow. PB 15" G4 1.67 GHz, 1.5 GB RAM, ATI Mobility Radeon 9700 AGP 128 MB
vade a écrit :
Hm. Interesting. GEM does not have a drop frame system?
no. i don't fell it would be very usefull. that would create more problem that what it could solve.
of course, nothing should crash, just slow down the system.
Im not sure
about the scheduler differences between PD and Max/Jitter, but most
Jitter events are in a different queue and have a drop frame handling
method built in to each object, and when drawing with openGL one
should use a 'qmetro', or a queue limited metro - to avoid such a
case. Im speaking a bit out of my realm of expertise but I dont really
think a Patcher should be able to do that, if it did indeed lock up
your system.
i think gem sheduling is just like using a metro with jitter. (but no qmetro)
cyrille
What is the proper way of handing this in PD/GEM? Sorry for causing a
crash. I saw your PD Jitter patch, but frankly I think some drop frame
system should be built into GEM to handle this automatically.Anyway, what kind of powerbook? It may not have the required hardware
support for the shader, which might be why you are only getting 10fps,
via software fallback?On Dec 25, 2007, at 1:04 PM, Max Neupert wrote:
very interesting, but also a good example on how to lock the computer completely with gem - at least my old powerbook. i had to hard reset because complete unresponsiveness. with [frame 10( it runs nicely though. see my last post on how to avoid the lock-up.
max
Am 24.12.2007 um 21:35 schrieb vade:
Yes, very efficient, and also give you LOTS of flexibility . the regular GL_BLEND_MODES do not offer that many variations (not many
are useful for video). Want to make a GPU powered chroma key - shader. Want to make feedback but have FSAA on, probably shader :) etc etc. Want to make 4 way mixer? shader! See where I am going here? :)On Dec 24, 2007, at 3:29 PM, Hans-Christoph Steiner wrote:
Nice, works for me. Is the idea that shaders are a efficient way of mixing video?
.hc
On Dec 24, 2007, at 12:04 PM, vade wrote:
Hello
Here is a 2 channel mixer using overlay blend mode with GLSL. This works, is decently fast and gives me the expected result.
If you want more blend modes, feel free to grab them from http:// 001.vade.info (or elsewhere, most are trivial to figure out)- the glsl shaders for the mixers use the same subroutine layout in the glsl, so it is trivial to swap. I did not include them out of sheer laziness.
Caveats with PD 0.4.03 Extended nightly from Dec 24th (Mac OS X 10.5.1, QT 7.3, Intel):
- had to edit the GLSL program to fix multitexture coordinate
issue. Only can use the texture dims from the zeroths texture unit.
- could not get sampler2DRect working at all - only had a single
texel mapped it seemed.
- had weird issue where I would sometimes have to close the gemwin
(0, destroy) and then re create it to see the textures assigned to texture units. this happened most often after closing and re-opening the patch.
Please see the included question(s) within the PD patch concerning using framebuffer to grab the output of the rendered shader and send it to yet another shader. Ive included an exposure shader in an attempt to make a chain of GLSL effects. I however could not get gemframebuffer to output any usable texture after using
glslprogram.Thanks, hope this is helpful to those out there
FUDDLE DUDDLE !@#!@#!@#()*!@#(*@#
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
cyrille henry wrote:
i think gem sheduling is just like using a metro with jitter. (but no qmetro)
In my experience Gem scheduling is exactly in sync with Pd's (logical) clock, measured with [timer] I always get 40ms when running at 48000Hz audio, 25fps gemwin, with 60fps screen refresh rate.
Interesting. Again, I am speaking only from tangential knowledge, but
at least with Jitter, drawing to OpenGL with a regular metro is a big
NO NO, and can also hang your system, or at least seem to lock it up.
Thank you for the explanation Claude and Cyrille.
Max: I have a similarly spec'd powerbook. Im happy to try the PD patch
out when I get a moment.
Thanks for the report.
On Dec 25, 2007, at 6:06 PM, Claude Heiland-Allen wrote:
cyrille henry wrote:
i think gem sheduling is just like using a metro with jitter. (but no qmetro)
In my experience Gem scheduling is exactly in sync with Pd's (logical) clock, measured with [timer] I always get 40ms when running at 48000Hz audio, 25fps gemwin, with 60fps screen refresh rate.
Claude
http://claudiusmaximus.goto10.org
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Am 26.12.2007 um 00:06 schrieb Claude Heiland-Allen:
cyrille henry wrote:
i think gem sheduling is just like using a metro with jitter. (but no qmetro)
In my experience Gem scheduling is exactly in sync with Pd's (logical) clock, measured with [timer] I always get 40ms when running at 48000Hz audio, 25fps gemwin, with 60fps screen refresh rate.
yes its in sync with the logical clock, see the patch i posted.
but realtime gives an enormous jitter and lag so the logical time
gets off pretty fast compared to it.
m
I just tried my powerbook 1.67 with OS X 10.4.9 and PD 0.4.03 nightly
12/24 (same as before), no crashing, solid 60fps with 2 QT movies
playing.
:)
On Dec 25, 2007, at 1:04 PM, Max Neupert wrote:
very interesting, but also a good example on how to lock the computer completely with gem - at least my old powerbook. i had to hard reset because complete unresponsiveness. with [frame 10( it runs nicely though. see my last post on how to avoid the lock-up.
max
Am 24.12.2007 um 21:35 schrieb vade:
Yes, very efficient, and also give you LOTS of flexibility . the regular GL_BLEND_MODES do not offer that many variations (not many
are useful for video). Want to make a GPU powered chroma key - shader. Want to make feedback but have FSAA on, probably shader :) etc etc. Want to make 4 way mixer? shader! See where I am going here? :)On Dec 24, 2007, at 3:29 PM, Hans-Christoph Steiner wrote:
Nice, works for me. Is the idea that shaders are a efficient way of mixing video?
.hc
On Dec 24, 2007, at 12:04 PM, vade wrote:
Hello
Here is a 2 channel mixer using overlay blend mode with GLSL. This works, is decently fast and gives me the expected result.
If you want more blend modes, feel free to grab them from http:// 001.vade.info (or elsewhere, most are trivial to figure out)- the glsl shaders for the mixers use the same subroutine layout in the glsl, so it is trivial to swap. I did not include them out of sheer laziness.
Caveats with PD 0.4.03 Extended nightly from Dec 24th (Mac OS X 10.5.1, QT 7.3, Intel):
- had to edit the GLSL program to fix multitexture coordinate
issue. Only can use the texture dims from the zeroths texture unit.
- could not get sampler2DRect working at all - only had a single
texel mapped it seemed.
- had weird issue where I would sometimes have to close the gemwin
(0, destroy) and then re create it to see the textures assigned to texture units. this happened most often after closing and re-opening the patch.
Please see the included question(s) within the PD patch concerning using framebuffer to grab the output of the rendered shader and send it to yet another shader. Ive included an exposure shader in an attempt to make a chain of GLSL effects. I however could not get gemframebuffer to output any usable texture after using
glslprogram.Thanks, hope this is helpful to those out there
FUDDLE DUDDLE !@#!@#!@#()*!@#(*@#
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
vade a écrit :
Yes, very efficient, and also give you LOTS of flexibility . the
regular GL_BLEND_MODES do not offer that many variations (not many are
useful for video). Want to make a GPU powered chroma key - shader.
Want to make feedback but have FSAA on, probably shader :)
why can't you do a feedback with FSAA?
cyrille
etc etc. Want to make 4 way mixer? shader! See where I am going here? :)
On Dec 24, 2007, at 3:29 PM, Hans-Christoph Steiner wrote:
Nice, works for me. Is the idea that shaders are a efficient way of
mixing video?.hc
On Dec 24, 2007, at 12:04 PM, vade wrote:
Hello
Here is a 2 channel mixer using overlay blend mode with GLSL. This
works, is decently fast and gives me the expected result.If you want more blend modes, feel free to grab them from http://001.vade.info (or elsewhere, most are trivial to figure out)- the glsl shaders
for the mixers use the same subroutine layout in the glsl, so it is
trivial to swap. I did not include them out of sheer laziness.Caveats with PD 0.4.03 Extended nightly from Dec 24th (Mac OS X
10.5.1, QT 7.3, Intel):
- had to edit the GLSL program to fix multitexture coordinate
issue. Only can use the texture dims from the zeroths texture unit.
- could not get sampler2DRect working at all - only had a single
texel mapped it seemed.
- had weird issue where I would sometimes have to close the gemwin
(0, destroy) and then re create it to see the textures assigned to
texture units. this happened most often after closing and re-opening the patch.Please see the included question(s) within the PD patch concerning
using framebuffer to grab the output of the rendered shader and
send it to yet another shader. Ive included an exposure shader in
an attempt to make a chain of GLSL effects. I however could not get
gemframebuffer to output any usable texture after using glslprogram.Thanks, hope this is helpful to those out there
FUDDLE DUDDLE !@#!@#!@#()*!@#(*@#
:)
<GEM_glsl_2_channel_mixer.zip> _______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Using ReBirth is like trying to play an 808 with a long stick. - David Zicarelli
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
if you use feedback with a low alpha for the gl_clear_color, the double/quadruple buffering for FSAA actually erases your previous frame. Thats one technique.
:)
On Tuesday, December 25, 2007, at 06:43PM, "cyrille henry" cyrille.henry@la-kitchen.fr wrote:
vade a écrit :
Yes, very efficient, and also give you LOTS of flexibility . the
regular GL_BLEND_MODES do not offer that many variations (not many are
useful for video). Want to make a GPU powered chroma key - shader.
Want to make feedback but have FSAA on, probably shader :)why can't you do a feedback with FSAA?
cyrille
etc etc. Want to make 4 way mixer? shader! See where I am going here? :)
On Dec 24, 2007, at 3:29 PM, Hans-Christoph Steiner wrote:
Nice, works for me. Is the idea that shaders are a efficient way of
mixing video?.hc
On Dec 24, 2007, at 12:04 PM, vade wrote:
Hello
Here is a 2 channel mixer using overlay blend mode with GLSL. This
works, is decently fast and gives me the expected result.If you want more blend modes, feel free to grab them from http://001.vade.info (or elsewhere, most are trivial to figure out)- the glsl shaders
for the mixers use the same subroutine layout in the glsl, so it is
trivial to swap. I did not include them out of sheer laziness.Caveats with PD 0.4.03 Extended nightly from Dec 24th (Mac OS X
10.5.1, QT 7.3, Intel):
- had to edit the GLSL program to fix multitexture coordinate
issue. Only can use the texture dims from the zeroths texture unit.
- could not get sampler2DRect working at all - only had a single
texel mapped it seemed.
- had weird issue where I would sometimes have to close the gemwin
(0, destroy) and then re create it to see the textures assigned to
texture units. this happened most often after closing and re-opening the patch.Please see the included question(s) within the PD patch concerning
using framebuffer to grab the output of the rendered shader and
send it to yet another shader. Ive included an exposure shader in
an attempt to make a chain of GLSL effects. I however could not get
gemframebuffer to output any usable texture after using glslprogram.Thanks, hope this is helpful to those out there
FUDDLE DUDDLE !@#!@#!@#()*!@#(*@#
:)
<GEM_glsl_2_channel_mixer.zip> _______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Using ReBirth is like trying to play an 808 with a long stick. - David Zicarelli
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Super nice ! I didn't know about the "texunit 0" message you can send to pix_texture. Are there other things I should know regarding [pix_texture] before I start over again my texture storage abstractions ?
Regarding texture coordinates, we can not access gl_MultiTexCoord1 due to a bug in [glsl_program] ? That means that it is ok as long as we use simple coordinates like from (0,0) to (1,1) on a rectangle ? That's a starting point. At least we can do overlay blending and so on.
And happy new 2008.
a
2007/12/24, vade doktorp@mac.com:
Hello
Here is a 2 channel mixer using overlay blend mode with GLSL. This works, is decently fast and gives me the expected result.
If you want more blend modes, feel free to grab them from http://001.vade.info (or elsewhere, most are trivial to figure out)- the glsl shaders for the mixers use the same subroutine layout in the glsl, so it is trivial to swap. I did not include them out of sheer laziness.
Caveats with PD 0.4.03 Extended nightly from Dec 24th (Mac OS X 10.5.1, QT 7.3, Intel):
- had to edit the GLSL program to fix multitexture coordinate issue.
Only can use the texture dims from the zeroths texture unit.
- could not get sampler2DRect working at all - only had a single
texel mapped it seemed.
- had weird issue where I would sometimes have to close the gemwin
(0, destroy) and then re create it to see the textures assigned to texture units. this happened most often after closing and re-opening the patch.
Please see the included question(s) within the PD patch concerning using framebuffer to grab the output of the rendered shader and send it to yet another shader. Ive included an exposure shader in an attempt to make a chain of GLSL effects. I however could not get gemframebuffer to output any usable texture after using glslprogram.
Thanks, hope this is helpful to those out there
FUDDLE DUDDLE !@#!@#!@#()*!@#(*@#
:)
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Alexandre Quessy a écrit :
Super nice ! I didn't know about the "texunit 0" message you can send to pix_texture. Are there other things I should know regarding [pix_texture] before I start over again my texture storage abstractions ?
Regarding texture coordinates, we can not access gl_MultiTexCoord1 due to a bug in [glsl_program] ? That means that it is ok as long as we use simple coordinates like from (0,0) to (1,1) on a rectangle ?
no. that mean it's ok if all your texture have the same size. if not, you'll have to make correction. i.e : coord_for_texture_1.x= K.x * tex_Coord_0.x coord_for_texture_1.y= K.y * tex_Coord_0.y
you'll nead to find K.x and K.y
using coordinate mode 0 : texture coordinate goes from (0,0) to (size.x,size.y), so it's easier to get the size of the texture (with pix_info), send it to the shader to make the correction.
cyrille
That's a starting point. At least we can do overlay blending and so on.
And happy new 2008.
a
2007/12/24, vade doktorp@mac.com:
Hello
Here is a 2 channel mixer using overlay blend mode with GLSL. This works, is decently fast and gives me the expected result.
If you want more blend modes, feel free to grab them from http://001.vade.info (or elsewhere, most are trivial to figure out)- the glsl shaders for the mixers use the same subroutine layout in the glsl, so it is trivial to swap. I did not include them out of sheer laziness.
Caveats with PD 0.4.03 Extended nightly from Dec 24th (Mac OS X 10.5.1, QT 7.3, Intel):
- had to edit the GLSL program to fix multitexture coordinate issue.
Only can use the texture dims from the zeroths texture unit.
- could not get sampler2DRect working at all - only had a single
texel mapped it seemed.
- had weird issue where I would sometimes have to close the gemwin
(0, destroy) and then re create it to see the textures assigned to texture units. this happened most often after closing and re-opening the patch.
Please see the included question(s) within the PD patch concerning using framebuffer to grab the output of the rendered shader and send it to yet another shader. Ive included an exposure shader in an attempt to make a chain of GLSL effects. I however could not get gemframebuffer to output any usable texture after using glslprogram.
Thanks, hope this is helpful to those out there
FUDDLE DUDDLE !@#!@#!@#()*!@#(*@#
:)
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
can you change the shader and patch I posted to use rectangular
textures? I tried and only had a single texel mapped.
Maybe its an OS X thing?
On Jan 2, 2008, at 12:18 PM, cyrille henry wrote:
using coordinate mode 0 : texture coordinate goes from (0,0) to
(size.x,size.y), so it's easier to get the size of the texture (with
pix_info), send it to the shader to make the correction.
hello,
i will, but i don't have time yet.
can you try this exemple and tell me if both texturing mode work?
cyrille
vade a écrit :
can you change the shader and patch I posted to use rectangular
textures? I tried and only had a single texel mapped.Maybe its an OS X thing?
On Jan 2, 2008, at 12:18 PM, cyrille henry wrote:
using coordinate mode 0 : texture coordinate goes from (0,0) to
(size.x,size.y), so it's easier to get the size of the texture (with
pix_info), send it to the shader to make the correction.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
// Cyrille Henry 2007
//#extension GL_ARB_texture_rectangle : enable //uniform sampler2DRect MyTex; uniform sampler2D MyTex;
void main (void) { // vec4 color = texture2DRect(MyTex, gl_TexCoord[0].st); vec4 color = texture2D(MyTex, gl_TexCoord[0].st); color = color* 0.5; gl_FragColor = color; }
// Cyrille Henry 2007
void main() { gl_TexCoord[0] = gl_MultiTexCoord0; gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}
// Cyrille Henry 2007
#extension GL_ARB_texture_rectangle : enable uniform sampler2DRect MyTex; //uniform sampler2D MyTex;
void main (void) { vec4 color = texture2DRect(MyTex, gl_TexCoord[0].st); // vec4 color = texture2D(MyTex, gl_TexCoord[0].st); color = color* 0.5; gl_FragColor = color; }
in fact, to use rectangular texture, you nead to initialise texture coordinate in a strange way. see the patch, it's better than any explanation.
cyrille
vade a écrit :
can you change the shader and patch I posted to use rectangular
textures? I tried and only had a single texel mapped.Maybe its an OS X thing?
On Jan 2, 2008, at 12:18 PM, cyrille henry wrote:
using coordinate mode 0 : texture coordinate goes from (0,0) to
(size.x,size.y), so it's easier to get the size of the texture (with
pix_info), send it to the shader to make the correction.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list