Code Monkey home page Code Monkey logo

Comments (6)

aras-p avatar aras-p commented on May 21, 2024

I could try fixing that, but I'd need a shader that reproduces the issue.

from glsl-optimizer.

krishna0808 avatar krishna0808 commented on May 21, 2024

I fixed the error about 'csel_TODO' by following.

float csel_TODO(bool cond, float val1, float val2)

{

return mix(val1, val2, cond);

}

vec3 csel_TODO(bvec3 cond, vec3 val1, vec3 val2)

{

return vec3 (mix(val1.x, val2.x, cond.x),

              mix(val1.y, val2.y, cond.y),

              mix(val1.z, val2.z, cond.z));

}

vec2 csel_TODO(bvec2 cond, vec2 val1, vec2 val2)

{

return vec2 (mix(val1.x, val2.x, cond.x),

             mix(val1.y, val2.y, cond.y));

}

But now, get the following.

shader info log: ERROR: 0:1145: Swizzle of non-vector primitive bool

ERROR: 0:1765: Swizzle of non-vector primitive bool

ERROR: 0:1798: Swizzle of non-vector primitive bool

ERROR: 0:2495: Swizzle of non-vector primitive bool

ERROR: 0:2506: Swizzle of non-vector primitive bool

Not sure what this error means.

On Thu, Oct 9, 2014 at 8:34 PM, Aras Pranckeviฤius <[email protected]

wrote:

I could try fixing that, but I'd need a shader that reproduces the issue.

โ€”
Reply to this email directly or view it on GitHub
#73 (comment)
.

from glsl-optimizer.

krishna0808 avatar krishna0808 commented on May 21, 2024

Fixed the swizzle error too.

the generated shader code has

mediump float tmpvar_463;
rgb_451 = csel_TODO ((tmpvar_463 == 0.0).xxx, rgb_451, tmpvar_470);

provided an implementation of csel_TODO(bool, vec3, vec3).

from glsl-optimizer.

aras-p avatar aras-p commented on May 21, 2024

It would be really useful to get the actual source shader that results in this. Then I could fix it properly, instead of you adding workarounds for a glsl optimizer bug...

from glsl-optimizer.

unity3diy avatar unity3diy commented on May 21, 2024

๐Ÿ‘

from glsl-optimizer.

jrmuizel avatar jrmuizel commented on May 21, 2024

I fixed this with jrmuizel@f758ca0

from glsl-optimizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.