December 12, 2011

Goran Goran
Lab Rat
3 posts

What the element is passed in vertextShader and fragmentShader if we don’t set ShaderEffectSource

 

If we use ShaderEffectItem element without setting ShaderEffectSource element into ShaderEffectItem as property. In the vertextShader and fragmentShader is passed the QML element (as a texture), which is parent of ShaderEffectItem?

  1. Item {
  2.     width: 100; height: 100;
  3.     ShaderEffectItem {
  4.         anchors.fill: parent
  5.         fragmentShader: "
  6.            varying highp vec2 qt_TexCoord0;
  7.            void main(void)
  8.            {
  9.                ....
  10.            }
  11.        "
  12.     }
}

Sorry for my bad English

 Signature 

Any fool can write code that a computer can understand. Good programmers write code that humans can understand.

0 replies

 
  ‹‹ QResource, Audio and SoundEffect problems      Audio - Working with samples ››

You must log in to post a reply. Not a member yet? Register here!