Threadwell

Recent Notes

  • DemetriSpanos

    Oct 06, 2026

    • archive
    • twitter
    • demetrispanos
  • NOTimothyLottes

    Oct 06, 2026

    • archive
    • twitter
    • notimothylottes
  • bonzajplc

    Oct 06, 2026

    • archive
    • twitter
    • bonzajplc
Home

❯

Archive

❯

Threads

❯

iquilezles

❯

Hey, don't "optimize" conditional moves with mix()+step().

❯

@iquilezles Maybe the article should further mention that the true evil of if statements in shaders only comes when the neighbouring shader invocations take different paths, as both instances must execute both paths and then throw one away

@iquilezles Maybe the article should further mention that the true evil of if statements in shaders only comes when the neighbouring shader invocations take different paths, as both instances must execute both paths and then throw one away

Properties5
typearchive
sourcetwitter
date2025-02-09
tagsarchive, twitter, iquilezles
description@iquilezles Maybe the article should further mention that the true evil of if statements in shaders only comes when the neighbouring shader invocations take different paths, as both instances must execute both paths and then throw one away

Feb 09, 20251 min read

  • archive
  • twitter
  • iquilezles

Source

  • URL: https://x.com/leowbattle/status/1888517439484240117
  • Author: Leo Battle (@leowbattle)
  • Posted: 2025-02-09 09:16:59

Branch

1/ @leowbattle

@iquilezles

Maybe the article should further mention that the true evil of if statements in shaders only comes when the neighbouring shader invocations take different paths, as both instances must execute both paths and then throw one away

Related

  • Spine: 2025-02-09-hey-dont-optimize-conditional-moves-with-mix-step

Graph View

  • Source
  • Branch
  • Related

Backlinks

  • Hey, don't "optimize" conditional moves with mix()+step().

Created with Quartz v5.0.0 © 2026

  • GitHub