Comments (9)
It turn out this feature is documented, in pix_texture help file.
I create a pull request to have it more visible :
#430
from gem.
hmm.
[render_trigger]
really behaves the same as [trigger]
(with the outlets swapped).
it was necessary at a time (more than 2 decades ago), when [gemhead]
would not emit a message for each render tick.
it shouldn't be used these days.
i couldn't even tell which part of the your example patch behaves unexpectedly.
from gem.
This follow a discussion in the pd list where I noticed that pix_texture is detached from the gemchain before the end of the gemchain if triggers are involved.
I use [render_trigger]
to show that the the problem is the post render code that is executed earlier that what I expected.
from gem.
trigger_in_gemchain.pd.zip
Here is a patch that show the unexpected behaviours.
from gem.
from a conceptual model, i think the current behaviour is the only sane option. (we do need to cleanup the render-state at some point, and once a subtree has done it's work seems to be a good time). (e.g. 1d273ca)
regarding the textures: i think this patch is correct in not applying a texture:
|
[pix_test]
|
[t a a]
| [pix_texture]
|
[square]
|
otherwise, it would be very hard to build a subtree without the texture.
i think the proper way to get the texture to the other branch, is by explicitly passing it:
|
[pix_test]
|
[t a a]
| [pix_texture]
| |
[pix_texture ]
|
[square]
|
(currently it also works without connecting the 2nd iolets of the two [pix_texture]
objects, but i think this is purely accidental and should not be relied on.)
the first example (using [gemlist]
) could probably be considered a bug.
however, getting it right would involve duplicating a lot of functionality from [pix_texture]
into [gemlist]
, and i'm not sure whether this is a good idea (as compared to just using another [pix_texture]
as shown above)
from gem.
Since I was not expected this behaviours, I use a lot of pix_set to "reset" the texture to white.
anyway, pix_texture is not the only object that use postrender. [alpha] is also disabled in postrender.
(I did not have a deep look at all the objects that use postrender)
This behaviours is alarming for me since there are lot's of patch and documentation, including in Gem example, where it is explain (or at least, based on) that outA and outB are equivalent :
[gemhead]
|
[t a a]
| [cube]
| |
| [outA]
|
[outB]
My real user case was :
[gemhead]
|
[t a a]
| [spigot]
| |
| [pix_image]
| |
| [pix_texture]
|
[cube]
I was expecting the texture to be activated or deactivated with the spigot.
The solution is obvious :
[gemhead]
|
[t a a]
| \
| \
| \
[spigot] |
| [spigot]
| |
| [pix_image]
| |
| [pix_texture]
| /
| /
| /
| /
[cube]
But it look less elegant.
For me, the good moment to cleanup the render-state is at the end of the gemhead tree.
But, well, I'll probably have to adapt if you think the current behaviours is the best one.
from gem.
post_render_and_gemchain_clean.pd.zip
This example show that cleaning the transformation matrix is only done after the gemhead tree.
it can't be reset at the end of the sub-tree for obvious reason. (it could have been cleaned at the beginning of the gemhead, but that would break lot's of useful feature)
I always assume it was cleaned at the same time as the post_render.
Except for compatibility with old patch, I still have hard time understanding why the post render should not be trigged latter.
from gem.
This behaviours is alarming for me since there are lot's of patch and documentation, including in Gem example, where it is explain (or at least, based on) that outA and outB are equivalent :
See Gem example/02.advanced/19.pointer.pd
from gem.
There is an undocumented feature of pix_texture to desactivate the texture mapping by simply sending 0/1 to its first inlet. It also should works with other pixel effects. This might be added to help file I guess.
from gem.
Related Issues (20)
- gemhead abstraction is not used, and the compiled object behaviors changed. HOT 2
- PD's not able to create GEM objects HOT 18
- Single buffer issues HOT 7
- 'film' plugin does not load HOT 2
- Force rendering on gemhead not working HOT 3
- [gemkeyboard] keycodes HOT 2
- YUV420p->RGBA conversion is broken HOT 11
- [pix_buffer_filmopen] argument issues
- [pix_film_buffer] as [pix_film] alternative HOT 1
- [pix_buffer_filmopen] show same frame
- [pix_film] don't detect last frame
- [model] crash after windows re-creation HOT 1
- pix_offset doesn't wrap values as help says HOT 4
- multisample framebuffer
- compute shader
- gemwin no longer accept argument for the X server to use HOT 6
- FSAA message did not work with gemglxwindow HOT 3
- Recent MacOS compile problems with Objective C sources HOT 11
- [GEM:videoNDI] [GEM:recordNDI] - libndi.4.dylib HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gem.