WebGLSamples / WebGL2Samples

Short and easy to understand samples demonstrating WebGL 2 features
Other
1.01k stars 143 forks source link

sync object #82

Closed trungtle closed 8 years ago

trungtle commented 8 years ago

A simple particle system to demonstrate using sync object to synchronize between transform feedback pass and render pass. Current doesn't work in Firefox due to a error that get thrown for exceeding maximum varyings allowed for transform feedback (seem weird, since I only used 4 varyings, so I take it that it's Firefox's bug).

shrekshao commented 8 years ago

Man this is cool. Please share the experience!

On Monday, February 8, 2016, Trung Le notifications@github.com wrote:

A simple particle system to demonstrate using sync object to synchronize between transform feedback pass and render pass. Current doesn't work in Firefox due to a error that get thrown for exceeding maximum varyings allowed for transform feedback (seem weird, since I only used 4 varyings,

so I take it that it's Firefox's bug).

You can view, comment on, or merge this pull request online at:

https://github.com/WebGLSamples/WebGL2Samples/pull/82 Commit Summary

  • [sync_object] - First checkpoint (code crashed with WebGL lost context
  • [sync_object] - Quick checkpoint before switching branch
  • [sync_object] - Switched to using texture
  • [sync_object] - Use separated mode instead of interleaved
  • [sync_object] - Implemented a one shot particle system
  • [sync_object] - Implemented a one shot particle system
  • [sync_object] - Remove emission rate and just use position.y as condition to respawn particles
  • [sync_object] - Added description for the sample
  • [sync_object] - Updated README
  • [sync_object] - Merge with master

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/WebGLSamples/WebGL2Samples/pull/82.

trungtle commented 8 years ago

Weird, travis said there's a missing semicolon at line 676 in sync_object.html but there are only 448 lines in this file. Hmm, will look into this tomorrow.

shrekshao commented 8 years ago

The line number is not right(probobly because it expand the functions from util?), but there is some semicolon missing for sure

On Monday, February 8, 2016, Trung Le notifications@github.com wrote:

Weird, travis said there's a missing semicolon at line 676 in sync_object.html but there are only 448 lines in this file. Hmm, will look into this tomorrow.

— Reply to this email directly or view it on GitHub https://github.com/WebGLSamples/WebGL2Samples/pull/82#issuecomment-181211572 .

trungtle commented 8 years ago

@shrekshao thanks! Fixed travis errors

pjcozzi commented 8 years ago

dot.png

@trungtle did you draw this? Otherwise, what is the source?

pjcozzi commented 8 years ago

I still need to run this, but it looks really great, just those minor comments.

trungtle commented 8 years ago

Yes, I drew the dot, but actually ended up didn't use it yet. I was planning on doing some blending with the texture based on lifetime but haven't got around to do it yet.

Also, I'm using the self-executing function because that was the pattern we have been using for the other samples with transform feedback? Other than to be consistent, no specific reasons.

pjcozzi commented 8 years ago

I'm using the self-executing function because that was the pattern we have been using for the other samples with transform feedback? Other than to be consistent, no specific reasons.

It is not needed here. Try it without, and keep whichever feels cleaner.

pjcozzi commented 8 years ago

Let me know when this is updated and ready for final review.

kenrussell commented 8 years ago

Rather than leaving the confusing "sync object" references, consider closing this pull request and opening a new one with the new sample which is intended to demonstrate a transform feedback based particle system.

trungtle commented 8 years ago

Closing now and I'll reopen with the correct name.