Results 1 to 7 of 7

Thread: Sort out the shader issues

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    6

    Sort out the shader issues

    You NEED to specify that target devices WILL support source code shaders.

    If you don't, just don't bother doing a new version.

    The current standard, isn't.

    The spec basically says ...

    you may or may not have source code shaders
    you may or may not have binary shaders
    you may or may not have oes extensions for shaders

    How are you supposed to support all devices with this as a standard?

    Either... sell out to a mobile phone company and become <insert company name here>gl instead of OpenGL, or do it right and make platform independence important.

    This sort of thing is why Java is such a dog. Start out with a platform independant VM then start buggering about with it creating pJava and Midp, and all the rest of the sub species, make it impossible to write code that will work on all platforms and wonder why people stop supporting it.

  2. #2

    Re: Sort out the shader issues

    I agree source code shaders should be mandatory included.

    Binary/Compiled shaders are handy for buffering the already done work,
    however they are no replacement for the usability/adaptability of source code shaders.

  3. #3

    Re: Sort out the shader issues

    Source code shaders should be mandatory.
    Fix this Khronos, seriously, this isn't even funny any more!!

  4. #4
    Junior Member
    Join Date
    Feb 2012
    Posts
    1

    Re: Sort out the shader issues

    Most implementations of OpenGL ES 2 do support loading shaders as source. For example, I do not know of any tablets or phones that support OpenGL ES 2 but do not support source shaders. You are correct that it is very difficult (or impossible) to write portable code using binary shaders!

    However, there are implementations of OpenGL ES 2 which run on small embedded systems and are not designed to run general purpose portable programs. These platforms usually run only programs that are written specifically for the platform. Some of these platforms have very limited memory and low powered CPUs. Including a shader compiler on such a system may be impractical. This is the main reason that binary shaders are allowed and that source shader support is not required.

    So in general you can assume that source shaders will be supported. This should only be a problem if you need your code to run on pretty obscure systems. Have you run into any systems that do not support source shaders?

    -Acorn

  5. #5
    Junior Member
    Join Date
    Feb 2012
    Posts
    1

    Re: Sort out the shader issues

    I have one additional observation: Any platform which supports HTML5 with WebGL must have source code shader support, as WebGL does not allow binary shaders.

  6. #6

    Re: Sort out the shader issues

    Quote Originally Posted by cob
    Most implementations of OpenGL ES 2 do support loading shaders as source. For example, I do not know of any tablets or phones that support OpenGL ES 2 but do not support source shaders. You are correct that it is very difficult (or impossible) to write portable code using binary shaders!

    However, there are implementations of OpenGL ES 2 which run on small embedded systems and are not designed to run general purpose portable programs. These platforms usually run only programs that are written specifically for the platform. Some of these platforms have very limited memory and low powered CPUs. Including a shader compiler on such a system may be impractical. This is the main reason that binary shaders are allowed and that source shader support is not required.

    So in general you can assume that source shaders will be supported. This should only be a problem if you need your code to run on pretty obscure systems. Have you run into any systems that do not support source shaders?

    -Acorn
    Those obscure systems do not have a problem with not being able to run arbitrary code from third parties thus also no need for certification or validation seems to me.
    Isn't the whole reasons for standards being able to run third party code on a system? Or running code on a third party system without having to test it specifically for that system?

  7. #7

    Re: Sort out the shader issues

    I have an idea.

    Let the spec say that you have to have at least or source code shaders or binary shaders and being able to do both is allowed!
    (If both are present we need a default for the driver when not specified in application code and programming constructs are not clearing it out. What about when the driver is capable of both and not specified in application code making default choice source code shaders?)

    And we need two flags: one for checking if source code shaders are supported and another one for checking if binary shaders are supported.

    This way there will be at least one thing supported. Application code can be written with source and binary shaders to be more transferable where necessary. (Just comment out, or some other programming construction for not using that one or use another shader, the binary shaders for the device you're not going to target this time.)

Similar Threads

  1. Shader Issues
    By Stainless in forum OpenGL ES 2X - for programmable 3D graphics pipelines
    Replies: 5
    Last Post: 07-14-2011, 01:22 AM
  2. Can you help me sort out a discrepancy?
    By OscarMayer in forum OpenMAX
    Replies: 0
    Last Post: 01-01-1970, 12:00 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
  •