Link to .capx file (required!):
VIEW
DOT SCREEN
gameswarp.com/studio/demo/Bug/DotScreen800x600
gameswarp.com/studio/demo/Bug/DotScreen1600x1200
COLOR HALFTONE
gameswarp.com/studio/demo/Bug/ColorHalftone800x600
gameswarp.com/studio/demo/Bug/ColorHalftone1600x1200
DOWNLOAD
DOT SCREEN
gameswarp.com/studio/demo/Bug/DotScreen-800x600.capx
gameswarp.com/studio/demo/Bug/DotScreen-1600x1200.capx
COLOR HALFTONE
gameswarp.com/studio/demo/Bug/ColorHalftone-800x600.capx
gameswarp.com/studio/demo/Bug/ColorHalftone-1600x1200.capx
Steps to reproduce:
See description below.
Observed result:
The two outputs are dissimilar.
Expected result:
The two outputs should remain the same even if the resolution is changed via C2 or manually via the control panel.
Browsers affected:
Chrome: yes
Firefox: browser had been uninstalled; unable to test
Internet Explorer: yes (on IE11)
Operating system & service pack:
Win 7 64-bit, SP1
Construct 2 version:
1.52
DESCRIPTION
I have been toying with my mouse cursor specific shaders for the past few hours now and have my suspicions that there are some problems with C2's shader "resolution" code.
If you could refer to these forum messages:
1. scirra.com/forum/effect-gs-4-circles-with-eyelid_topic82420.html
2. scirra.com/forum/effect-gs-2-flower-petals_topic81325.html
I got different results just by changing the screen resolution between 1600x1200 and 800x600 (this includes resizing the background to fit the screen). In one case, the mouse cursor is in the exact center of the flower petal effect, while it is displaced in the other.
I simply cannot reconcile my observations of Construct 2 with what I see on Heroku and Shadertoy. Try this one for example and change the screen resolution via Control Panel: glsl.heroku.com/e
The pattern should remain the same - centered on the mouse.
On Heroku/Shadertoy, they have the resolution parameter that takes care of all resolution switching problems. On Construct 2, I coded it as: vec2 resolution = vec2(pixelWidth, pixelHeight); - which is similar to the approach used in Heroku/Shadertoy.
To demonstrate there is an error in Construct 2, I had to search for an existing plug-in that would clearly demonstrate the problem. Here are two.
Just create two Color Halftone (or two Dot Screen) effects having the same settings, but set one to 1600x1200, and the other to 800x600. You will see that the output images are different in appearance because of the resolution change.
I may be wrong... but please, give me the benefit of doubt... as I am at my wits end as to why C2 can't behave similarly to Heroku/Shadertoy. Would love to hear your explanation.