Shaders in Graphics 2.0

Is there a way to specify own effects using GLSL or HLSL ? May be in the Enterprise Edition ?

Hi @gr.markin6,

Do you wish to specify your own multi-pass shaders? This is possible and it’s explained in this tutorial:

http://www.coronalabs.com/blog/2013/10/17/tutorial-multi-pass-shaders-in-graphics-2-0/

Hope this helps somewhat,

Brent

Thanks for your reply. I know this tutorial but I did not understand if one can specify own effect for a multi-pass shader using either GLSL or HLSL.

E.g. in the example from the tutorial, as far as I understand the “filter.blurHorizontal” effect is provided by the SDK. Can one write own effects using a shader language ? What we want to do is to specify our own shader for gradient effect in order to support more than two stop colors. In the Gfx 2.0 we can use only two stop colors.

  1. kernel.graph =
  2. {
  3. nodes = {
  4. horizontal = { effect=“filter.blurHorizontal”, input1=“paint1” },
  5. vertical = { effect=“filter.blurVertical”, input1=“horizontal” },
  6. },
  7. output = “vertical”,
  8. }

Hi @gr.markin6,

At this time, we don’t allow for custom-built effects using a shader language. It may be possible in Enterprise, however I haven’t investigated that possibility extensively.

Best regards,

Brent

Hi Brent,

actually it would be also nice to have this feature in Enterprise as we want to switch to the latter. Do you know where I can find more details on the custom shaders support in Enterprise ?

Best regards,

Grigory 

Right now, we don’t allow you to customize shaders. We’re investigating how this could be offered in Enterprise, but there are fundamental issues which is why it’s taking longer than you might expect.

I’ll give you one example: we’ve had to re-plumb our shaders at least 3 times now, given the inconsistencies in the GL device driver across devices, and that has meant making continued breaking changes to our internal shaders. In other words, even our internal implementation is a constant moving target given the realities of the device hardware that’s currently popular.

Hi @gr.markin6,

Do you wish to specify your own multi-pass shaders? This is possible and it’s explained in this tutorial:

http://www.coronalabs.com/blog/2013/10/17/tutorial-multi-pass-shaders-in-graphics-2-0/

Hope this helps somewhat,

Brent

Thanks for your reply. I know this tutorial but I did not understand if one can specify own effect for a multi-pass shader using either GLSL or HLSL.

E.g. in the example from the tutorial, as far as I understand the “filter.blurHorizontal” effect is provided by the SDK. Can one write own effects using a shader language ? What we want to do is to specify our own shader for gradient effect in order to support more than two stop colors. In the Gfx 2.0 we can use only two stop colors.

  1. kernel.graph =
  2. {
  3. nodes = {
  4. horizontal = { effect=“filter.blurHorizontal”, input1=“paint1” },
  5. vertical = { effect=“filter.blurVertical”, input1=“horizontal” },
  6. },
  7. output = “vertical”,
  8. }

Hi @gr.markin6,

At this time, we don’t allow for custom-built effects using a shader language. It may be possible in Enterprise, however I haven’t investigated that possibility extensively.

Best regards,

Brent

Hi Brent,

actually it would be also nice to have this feature in Enterprise as we want to switch to the latter. Do you know where I can find more details on the custom shaders support in Enterprise ?

Best regards,

Grigory 

Right now, we don’t allow you to customize shaders. We’re investigating how this could be offered in Enterprise, but there are fundamental issues which is why it’s taking longer than you might expect.

I’ll give you one example: we’ve had to re-plumb our shaders at least 3 times now, given the inconsistencies in the GL device driver across devices, and that has meant making continued breaking changes to our internal shaders. In other words, even our internal implementation is a constant moving target given the realities of the device hardware that’s currently popular.