Search:

Type: Posts; User: Ralph

Search: Search took 0.00 seconds.

  1. Replies
    5
    Views
    3,409

    Re: WebGL function error

    Nobody can really help you here. These error messages clearly state what's wrong. Textures should have a size of a power of 2 and the matrices are 4x4 so 16 values. Not being rude but maybe you...
  2. Replies
    5
    Views
    3,409

    Re: WebGL function error

    That error is thrown if Object.Vertices is undefined or not an array
  3. Replies
    4
    Views
    2,424

    Re: Drawing a simple square in webgl

    n/m
  4. Replies
    4
    Views
    2,424

    Re: Drawing a simple square in webgl

    gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition.xyz, 1.0);

    This multiplies the MVP matrix, a 4x4 matrix, with the vertex positon, a vec4, transforming that position.


    mat4.multiply(...
  5. Replies
    4
    Views
    1,596

    Re: State dependant rendering of objects

    Sometimes just talking about the problem helps :)



    No there isn't. If you need to give a shader a large amount of data you usually do it with a texture.

    Now for the problem. Do you need to...
  6. Replies
    4
    Views
    1,596

    Re: State dependant rendering of objects

    Ok since you also asked that on stackoverflow it seem you really want help, so I'll try to help you. However, either it's just me after 2 days of refactoring code or your explanation of your problem...
  7. Replies
    3
    Views
    1,850

    Re: Question about textures in different OS

    Can only guess here without having your code and/or any console error messages. Are your textures sized to a power of 2?

    Have you tried using the debug context?...
  8. Replies
    4
    Views
    4,607

    Re: add event listener in webgl designed object

    Doesn't do anything special. If you look at the code of that expample, especially that part :



    renderer.domElement.addEventListener('click', function(e){
    var mouseX = e.clientX -...
  9. Replies
    4
    Views
    4,607

    Re: add event listener in webgl designed object

    There's no simple way. You can however add event listeners to the canvas. On mouse event do a picking and then emit a signal for every picked point. That's how I did it for the tooltips at...
  10. Re: Details about handling transparency with depth peeling

    Well that wouldn't make much sense as that would be worse than standard transparency.

    Another idea I had was recycling tex0 and tex1. I only use them during the opaque render pass. That would mean...
  11. Re: Details about handling transparency with depth peeling

    So did another test. Doing only two peels doesn't really help much. You need C0, C1, C2, D0, D1 anyway. gl.texture0 and gl.texture1 are used too so 7 units are needed. To be honest i still had D2...
  12. Re: Details about handling transparency with depth peeling

    I'm also doing 4 transparent peels. But good idea reducing that number. Will do some testing later and report my findings.
  13. Re: Details about handling transparency with depth peeling

    Nice writeup, made my life easier. I implemented it myself this weekend because I wasn't too satisfied with my triangle sorting transparency. This works good and at acceptable speed. Only drawback I...
  14. Replies
    1
    Views
    2,528

    Re: PixelArray to teximage2d

    You might need to change your webgl initialization for that to work.


    gl = canvas.getContext("experimental-webgl", {preserveDrawingBuffer: true});
  15. Thread: Some questions

    by Ralph
    Replies
    5
    Views
    2,914

    Re: Some questions

    That's an approach I certainly gonna try out. But as you can see in my picture the inner surface is randomly folded so there are different overlappings from different angles even when staying in the...
  16. Thread: Some questions

    by Ralph
    Replies
    5
    Views
    2,914

    Re: Some questions

    Thanks Steve, that clears things up a bit.



    That was badly worded and kinda stupid to ask. The question should've been more like how to do it. My Javascript experience is some years old so I'm...
  17. Thread: Some questions

    by Ralph
    Replies
    5
    Views
    2,914

    Some questions

    I just aquired a project to do visualization in WebGL. My experience is some years C++, OpenGL and GLSL. I did some reading and have a basic idea about what's possible and what not.

    So here is...
Results 1 to 17 of 21