Custom shader

  • #10, z stroncisThursday, 27. April 2017, 11:11 hodinky 8 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-...

    Bažant

    42 Posts


  • #11, z ke4Thursday, 27. April 2017, 13:48 hodinky 8 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.

    Zabiják klíčů

    810 Posts

  • #12, z SimonSThursday, 27. April 2017, 16:14 hodinky 8 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

    Kapitán

    1582 Posts

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

    Zabiják klíčů

    810 Posts