Ashley's Recent Forum Activity

  • Create a new particles object each time you want to fire a one-shot.

  • Have you got a minimal repro to play with?

  • Sorry about this, botched something in this update. Should have a .2 update out to fix it tomorrow. Don't forget you're opting in to this kind of thing occasionally if you choose to use beta releases!

  • Oh, and remove this line at the top - it's a completely redundant texture lookup which isn't referenced anywhere!

    vec4 front = texture2D(samplerFront, vTex);[/code:ftvktn0g]
    
    That should double your rendering throughput 
    
    Also, tagging @Aurel
  • The renderer is fully premultiplied, meaning the color rgb values are multiplied by their alpha components. For example 50% opacity red is actually (0.5, 0, 0, 0.5), and will still render as full brightness red at 50% opacity instead of a dark "half red" at 50% opacity due to the renderer blend configuration. It's easy to mess up premultiplied alpha in shaders.

    I can't figure out why right now but there seems to be some kind of built in fog calculation which screws up the premultiplied alpha. I don't know why that would need to be in the shader anyway, since if it's linear you can fake it easily with a sprite. If you remove the fog then the alpha blend works correctly.

    Just replace the last few (broken) lines of the shader:

        vec4 color = texture2D(samplerFront, vec2(mod(xx * scale_x, 1.0), mod(yy * scale_y, 1.0)));
        
        //add some fog in the distance
        gl_FragColor = vec4(color.rgb/color.a, color.a*(abs(pz)*15.0));[/code:5se2x7m3]
    
    with this, which skips the fog calculation:
    
    [code:5se2x7m3]gl_FragColor = texture2D(samplerFront, vec2(mod(xx * scale_x, 1.0), mod(yy * scale_y, 1.0)));[/code:5se2x7m3]
    
    Top tip: GPUs aren't good at conditionals. The shader would probably be a lot faster on low-end hardware if the "single_image" conditional were removed. It could be made as two separate shaders instead, each with the mode hard coded on/off. Then you have a blazing fast shader: one texture lookup per fragment, no conditionals, no loops... it should even run well on mobile!
  • Yeah, I tried it out and the autocomplete kind of works better, since it updates as you type and you also get all syntax highlighting/other autocomplete features. This is done for the next build so closing.

  • Should be fixed in the next build, we made some changes to how the function name suggestions work.

  • I looked in to this more and it could be fairly tricky to sort out and take a while. I'd prefer not to spend a lot of time on it if it's not really a huge problem since as ever we get more feature requests than we can address quickly... the easiest two options are:

    1) leave it as it is (my preferred, since it involves no work )

    2) go back to the old way, but list the functions in auto-complete when you type "

    What do you think is the best way? How about if this same change is extended to animation names, layout names etc - would you want the same solution?

  • That's what letterbox scale mode does. CocoonJS doesn't support letterbox scale so falls back to scale outer. Just choose scale outer if you want the same on other platforms.

  • Do you have the latest updates installed? I think it's VS2013 Update 3 now.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Try to remember to clearly state what your .capx is and any extra steps to reproduce the problem. We ask for a .capx that reproduces the problem, and it's confusing if you provide one that doesn't reproduce the problem and actually needs extra steps you didn't mention.

Ashley's avatar

Ashley

Online Now
Early Adopter

Member since 21 May, 2007
Last online 27 Oct, 2026

Twitter
Ashley has 1,835,186 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x6
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x44
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs