Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. General shaders discussion (Warning: Not so good question!)
Qt 6.11 is out! See what's new in the release blog

General shaders discussion (Warning: Not so good question!)

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 914 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ealioneE Offline
    ealioneE Offline
    ealione
    wrote on last edited by
    #1

    Hi everyone,

    Before I start let me say that this is probably a bad question and if you are new to Qt, or hoping to learn anything for shaders or OpenGL by reading this, I am afraid you will lose your time.

    That said, I moved into learning a bit more about OpenGl and shaders, by studying some of the examples. The easiest of which, and thus more interesting for me, being the 'openglunderqml' one. It renders a 'squircle' in a qml window.

    I did understand that it does so by using vertex and fragment shaders, that are compiled at runtime, in order to directly access the pixel colour values.

    Inspired by this I did a little search on finding other shaders and ended up "here":https://www.youtube.com/watch?v=cZeCgOutZHE

    which eventually led me to the shaders used by the author "here":http://pastebin.com/UwDaqNxq

    How can one implement those shaders?
    Could it be possible that by using those I would be able not to see the squircle, but the ocean shown on the video?

    I do realise that it probably is not that simple, and it would need a lot of work to do it. Something that would be unpractical, or impossible for someone to explain on a forum post, but any useful comment or resourse is welcomed.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi,

      you've chosen an interesting and quite challenging topic. You could start by replacing the squircle by a flat rectancled matrix of points and add gui options to manipulate the "camera" pose. When you got that working you could implement a geometry shader to create something like a "flying carpet of dots".

      Happy coding :-)

      1 Reply Last reply
      0
      • ealioneE Offline
        ealioneE Offline
        ealione
        wrote on last edited by
        #3

        I see where you are going, I could after that make the dots position change according to some function. That of curse in the case that I do manage to make the flying carpet in the first place.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved