Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: A self-contained adaptive quality example

  1. #1
    Junior Member
    Join Date
    May 2010
    Posts
    16

    A self-contained adaptive quality example

    I've put together a simple adaptive-quality fragment shader example.

    The code does not use any external libraries, so it might be educational for those who want to start playing with WebGL.

    You can run it from this page: http://guciek.net/en/3d/adaptive_quality_webgl_example

    Note that it was specifically meant to be simple!

  2. #2

    Re: A self-contained adaptive quality example

    thanks,..but when I wanted to run I got: Error: Could not compile vertex or fragment shader!. Didnīt investigate it further....

  3. #3
    Junior Member
    Join Date
    May 2010
    Posts
    16

    Re: A self-contained adaptive quality example

    Quote Originally Posted by miroslav_karpis
    thanks,..but when I wanted to run I got: Error: Could not compile vertex or fragment shader!. Didnīt investigate it further....
    Could you please write what your browser/OS/graphics card/driver configuration is?

    I have tested this example on two NVidia cards and the OSMesa renderer, so you are probably using some other card brand. Thanks.

  4. #4

    Re: A self-contained adaptive quality example

    Quote Originally Posted by kguciek
    Could you please write what your browser/OS/graphics card/driver configuration is?

    I have tested this example on two NVidia cards and the OSMesa renderer, so you are probably using some other card brand. Thanks.
    - macBook(OSX 10.6.3) & NVIDIA GeForce 320M - 256MB: - shader problem in: Minefield(3.7a5pre) and WebKit(4.0.5 (6531.22.7, r60376))

    - have tried also on ubuntu(10.04) and chrome - worked well

  5. #5
    Junior Member
    Join Date
    May 2010
    Posts
    16

    Re: A self-contained adaptive quality example

    Quote Originally Posted by miroslav_karpis
    macBook(OSX 10.6.3) & NVIDIA GeForce 320M - 256MB)
    Thanks again. Unfortunately, it is not probable that I will have access to Apple computers anytime soon (well, I can only mess with this in an Apple Store, but this would look strange, hahah).

    I don't want to pursue you, but if you have time, you might try to remove both functions and calls to them from the fragment shader and see if it works then.

  6. #6

    Re: A self-contained adaptive quality example

    I've had a quick look at the shaders and it looks like you're missing quite few ".0" of the end of the floats, macs really don't like that. eg:
    float angle = dot(normalize(vec3(-10, -10, 10)), normalize(norm));
    should be:
    float angle = dot(normalize(vec3(-10.0, -10.0, 10.0)), normalize(norm));
    Like you I've no mac to test on and I'm forever making that mistake.

  7. #7
    Junior Member
    Join Date
    May 2010
    Posts
    16

    Re: A self-contained adaptive quality example

    Quote Originally Posted by super_eggbert
    I've had a quick look at the shaders and it looks like you're missing quite few ".0" of the end of the floats, macs really don't like that.
    You are quite right... I've fixed that, so if you could check if it works now...

  8. #8

    Re: A self-contained adaptive quality example

    Quote Originally Posted by kguciek
    I've fixed that, so if you could check if it works now...
    still not OK:

    line 199: - Uncaught TypeError: Cannot call method 'shaders' of null

  9. #9
    Junior Member
    Join Date
    May 2010
    Posts
    16

    Re: A self-contained adaptive quality example

    Now I have fixed shader code to pass the newly-introduced validation - maybe this has helped the Mac case? Or changed anything at all?

  10. #10

    Re: A self-contained adaptive quality example

    Quote Originally Posted by kguciek
    Now I have fixed shader code to pass the newly-introduced validation - maybe this has helped the Mac case? Or changed anything at all?
    running on mac nice and smooth

Page 1 of 2 12 LastLast

Similar Threads

  1. Anti-aliasing quality
    By mustaf in forum OpenVG and VGU
    Replies: 1
    Last Post: 11-07-2007, 04:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •