Custom shader

  • #10, by stroncisThursday, 27. April 2017, 11:11 7 years ago
    You can find some starting info for shaders here: http://www.visionaire-studio.com/luadocs/#shaders

    Thank You! And this is very good resource, i must say.

    P.S.: and maybe someone will find useful reference for GLSL to HLSL https://docs.microsoft.com/en-us/windows/uwp/gaming/glsl-to-...

    Newbie

    42 Posts


  • #11, by ke4Thursday, 27. April 2017, 13:48 7 years ago
    Looking at the docs, is the draw function alredy built in RC0?

    graphics.font = Fonts["fontName"] 
    
    graphics.drawFont("Hello world", 500, 200, 1.0)

    local sprite = graphics.loadFromFile("vispath:test.webp")
    
    graphics.drawSprite(sprite, 500, 200, 0)

    Neither of this is doing anything.

    Key Killer

    810 Posts

  • #12, by SimonSThursday, 27. April 2017, 16:14 7 years ago
    I keep repeating this, but you need to do this in a callback. I will soon a page on the draw functions:

    graphics.addDrawFunc("draw()", 0)
    function draw()
      graphics.font = Fonts["fontName"] 
    
      graphics.drawFont("Hello world", 500, 200, 1.0)
    end

    Thread Captain

    1582 Posts

  • #13, by ke4Thursday, 27. April 2017, 16:35 7 years ago
    Sorry didn't notice you mentioned this. Anyway it works now, thanks! smile

    Key Killer

    810 Posts