Convert internal SkSL to use .eval()
Also update RELEASE_NOTES to describe new syntax.
Change-Id: I2666551b98f80b61ae3a48c92a9e306cdc7242b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444735
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/samplecode/Sample3D.cpp b/samplecode/Sample3D.cpp
index 2a752e5..4ddc15d 100644
--- a/samplecode/Sample3D.cpp
+++ b/samplecode/Sample3D.cpp
@@ -389,7 +389,7 @@
}
half4 main(float2 p) {
- float3 norm = convert_normal_sample(shade(normal_map, p));
+ float3 norm = convert_normal_sample(normal_map.eval(p));
float3 plane_norm = normalize(localToWorldAdjInv * norm.xyz0).xyz;
float3 plane_pos = (localToWorld * p.xy01).xyz;
@@ -399,7 +399,7 @@
float dp = dot(plane_norm, light_dir);
float scale = min(ambient + max(dp, 0), 1);
- return shade(color_map, p) * scale.xxx1;
+ return color_map.eval(p) * scale.xxx1;
}
)";
auto [effect, error] = SkRuntimeEffect::MakeForShader(SkString(code));