Wave simulation looks better when you render at a higher resolution then downscale the result to the display resolution.
| 57 | // Wave simulation looks better when you render at a higher resolution then |
| 58 | // downscale the result to the display resolution. |
| 59 | fl::SuperSample getSuperSample() { |
| 60 | switch (int(superSample)) { |
| 61 | case 0: |
| 62 | return fl::SuperSample::SUPER_SAMPLE_NONE; |
| 63 | case 1: |
| 64 | return fl::SuperSample::SUPER_SAMPLE_2X; |
| 65 | case 2: |
| 66 | return fl::SuperSample::SUPER_SAMPLE_4X; |
| 67 | case 3: |
| 68 | return fl::SuperSample::SUPER_SAMPLE_8X; |
| 69 | default: |
| 70 | return fl::SuperSample::SUPER_SAMPLE_NONE; |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | void loop() { |
| 75 | // Allow the waveSimulator to respond to the current slider value each frame. |