[WordPress] 外掛分享: Display WebGL Shader

前言介紹

  • 這款 WordPress 外掛「Display WebGL Shader」是 2021-12-21 上架。
  • 目前有 20 個安裝啟用數。
  • 上一次更新是 2022-05-01,距離現在已有 1397 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 5.8 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

zebranorth |

外掛標籤

block | webgl | shader | webgl2 | shadertoy |

內容簡介

此外掛允許您顯示與 https://shadertoy.com 相容的 WebGL2 片段著色器。

只需將您的片段著色器代碼複製並粘貼到編輯框中即可。

此外掛使用 Brandon Jones 和 Colin MacKensie IV 的開源 "gl-matrix" 函式庫。

您的著色器代碼應類似以下範例。對於每個像素,都會呼叫 mainImage() 函數。

`

void mainImage(out vec4 fragColor, in vec2 fragCoord)
{
// 正規化像素座標 (從 0 到 1)。
vec2 uv = fragCoord / iResolution.xy;

// 輸出到螢幕 as (r, g, b, alpha)。
fragColor = vec4(uv.x, uv.y, 0.0, 1.0);

}
`

原文外掛簡介

This plugin allows you to display a WebGL2 fragment shader, compatible with https://shadertoy.com
Simply copy and paste the code of your fragment shader into the edit box.
This plugin makes use of the open source “gl-matrix” library by Brandon Jones and Colin MacKensie IV.
Your shader code should look like the example below. The mainImage() function is called once for each pixel.
`

void mainImage(out vec4 fragColor, in vec2 fragCoord)
{
// Normalized pixel coordinates (from 0 to 1).
vec2 uv = fragCoord / iResolution.xy;
// Output to screen as (r, g, b, alpha).
fragColor = vec4(uv.x, uv.y, 0.0, 1.0);

}
`

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Display WebGL Shader」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.2 | 1.0.3 | trunk | v1.0.3 |

延伸相關外掛(你可能也想知道)

暫無相關外掛推薦。

文章
Filter
Mastodon