Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: hashbrown

Page 1 of 3 1 2 3

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    246

    Thanks a lot for the reply John! I agree,...

    Thanks a lot for the reply John!



    I agree, nonetheless I'm using the frag shader in order to use sites like ShaderToy. As far as I know, users can only edit the fragment shader on that...
  2. Replies
    2
    Views
    246

    Trouble plotting a particular equation

    I'm trying to plot the following equation : y = random( floor(uv.x) ):

    https://s1.postimg.org/7jjvlsjxsb/plot1.png
    figure 1

    I've tried other equations and they work just fine:
    ...
  3. GC, thanks, I'm clear now :)

    GC, thanks, I'm clear now :)
  4. How can I move pixels of a particular color and leave the others in place?

    I know how to draw shapes, move, and deform them by modifying the uv coordinates:




    // Code moves a circle to the right of the screen...

    void main () {

    vec2 uv = gl_FragCoord.xy...
  5. I figured it out. The dudv map didn't have the...

    I figured it out. The dudv map didn't have the right texture parameters. I found this out by looking at the 3 textures I was passing and the only one that seemed off was the dudv map, so clearly I...
  6. I forgot to mention, I'm starting to think that...

    I forgot to mention, I'm starting to think that the problem with the dudv texture moving has to do with not tiling the texture properly. I tried to render only the dudv texture and as soon it moves...
  7. Sorry GC, it's intentional that the distortion...

    Sorry GC, it's intentional that the distortion vector is the first quadrant. The dudv texture i got provides unsigned values. My apologies if I don't seem very clear, I've been learning slowly with a...
  8. Hi GClements, if I understand correctly, I was...

    Hi GClements, if I understand correctly, I was planning on retrieving the values from the dudv texture for the distortion.

    Oh I left out what newTexCoords is, my apologies: vec2(a_texCoords.x /...
  9. Problem making water, dudv image map keeps translating to the left.

    I'm attempting to create water using a dudv map, but having trouble with the waving effect. I managed to create the effect but as time goes by, the wave effect moves to the left of the quad until...
  10. Replies
    2
    Views
    397

    John, amazing. Now I understand how...

    John, amazing. Now I understand how multi-texturing works, and I tried several sites. but your explanation did it. Oh and the problem I mostly had was that I was missing the reset marker. As soon as...
  11. Replies
    2
    Views
    397

    Problem multi-texturing my water quad.

    I’m attempting to make water using color, depth frame buffers and a quad. When I bind the frame buffer’s color texture, I actually see the tex rendered on the quad, but once I try binding TEXTURE1...
  12. Thanks Silence and Photon! I'll give it a try....

    Thanks Silence and Photon! I'll give it a try. I'm trying to use the depth buffer for my water shader. We'll see how that comes along. Thanks again :)
  13. What would I see if I bind the depth buffer texture on to a quad?

    I'm currently binding the Color Texture of my Color Frame Buffer on to a Quad. I see my scene inverted so I know it's working. But when I render the depth buffer texture on this quad, it's all red...
  14. Replies
    3
    Views
    697

    Got it working. I'll share the code, the Stack...

    Got it working. I'll share the code, the Stack Overflow answer and GClements suggestion is what I used.



    // vertex
    ....
    varying float check; // bad name i know

    void main (void) {
    ...
  15. Replies
    3
    Views
    697

    Gc thanks a lot, with this I have enough info to...

    Gc thanks a lot, with this I have enough info to keep going. By the way I honestly didn't know that discard was actually a real statement, thought it was pseudo code. :doh: I got the hang of opengl...
  16. Replies
    3
    Views
    697

    Is there a gl_ClipPlane alternative?

    I'm reading on how to simulate water, but unfortunately stuck trying to find an alternative for gl_ClipPlane. I'm using WebGL 1 and it uses GLSL 1.0. Is there anyway I can do the same thing...
  17. Thanks Silence, I'll give it a try, although I'm...

    Thanks Silence, I'll give it a try, although I'm going to probably end up re-writing this function again. I want to make sure I understand this concept. I'll definitely share my function here on this...
  18. Can't get my FPS Camera working. WebGL demo and code included.

    I'm trying to figure out how to make a fps camera but unfortunately stuck. I'll briefly explain what I'm doing but I'll also share my webgl code so you can see for yourself.



    // First...
  19. Thanks GC, I'll definitely use the geometry...

    Thanks GC, I'll definitely use the geometry shader once I write the desktop implementation. For now I generate them client side as you suggested.
  20. Can I draw lines representing normal vectors from fragment shader?

    Is there a way I can draw lines from the center of every face of a mesh in the fragment shader? I'm trying to visualize the mesh's normals, but not sure how to.

    I've got a normalMatrix uniform...
  21. I figured it out :) Just in case somebody is...

    I figured it out :) Just in case somebody is interested, I was able to displace the vertices in the following manner:



    void main() {
    vec4 pos = a_position;

    float amt = scale * 0.5 *...
  22. John, I'm pretty sure this is what I'm looking...

    John, I'm pretty sure this is what I'm looking for, is this feature available in WebGL/GLSL1.0? I tried the modulo % operator but unfortunately it doesn't work in glsl 1.0 only GLSL 3.0 and >. So I...
  23. How do I move individual vertices from the vertex shader?

    I'm a little confused when using the vertex shader. I'm trying to displace each vertex point of my mesh from the vertex shader program using cos(rad), but when I do, all vertices are moved at the...
  24. Thanks GC, I made the grid smaller at the end,...

    Thanks GC, I made the grid smaller at the end, but I'm going to try making a texture mapped quad now :)
  25. John, thanks! I didn't know what to look for, now...

    John, thanks! I didn't know what to look for, now I do. I'll look into all options.
Results 1 to 25 of 75
Page 1 of 3 1 2 3