[Impeller] Pass local coordinates to RuntimeEffect fragment shaders (flutter/engine#37105)
This commit is contained in:
@@ -1285,11 +1285,11 @@ FILE: ../../../flutter/impeller/entity/shaders/morphology_filter.frag
|
||||
FILE: ../../../flutter/impeller/entity/shaders/morphology_filter.vert
|
||||
FILE: ../../../flutter/impeller/entity/shaders/position.vert
|
||||
FILE: ../../../flutter/impeller/entity/shaders/position_color.vert
|
||||
FILE: ../../../flutter/impeller/entity/shaders/position_no_color.vert
|
||||
FILE: ../../../flutter/impeller/entity/shaders/position_uv.vert
|
||||
FILE: ../../../flutter/impeller/entity/shaders/radial_gradient_fill.frag
|
||||
FILE: ../../../flutter/impeller/entity/shaders/rrect_blur.frag
|
||||
FILE: ../../../flutter/impeller/entity/shaders/rrect_blur.vert
|
||||
FILE: ../../../flutter/impeller/entity/shaders/runtime_effect.vert
|
||||
FILE: ../../../flutter/impeller/entity/shaders/solid_fill.frag
|
||||
FILE: ../../../flutter/impeller/entity/shaders/solid_fill.vert
|
||||
FILE: ../../../flutter/impeller/entity/shaders/srgb_to_linear_filter.frag
|
||||
|
||||
@@ -45,12 +45,12 @@ impeller_shaders("entity_shaders") {
|
||||
"shaders/morphology_filter.frag",
|
||||
"shaders/morphology_filter.vert",
|
||||
"shaders/position_color.vert",
|
||||
"shaders/position_no_color.vert",
|
||||
"shaders/position_uv.vert",
|
||||
"shaders/position.vert",
|
||||
"shaders/radial_gradient_fill.frag",
|
||||
"shaders/rrect_blur.vert",
|
||||
"shaders/rrect_blur.frag",
|
||||
"shaders/runtime_effect.vert",
|
||||
"shaders/solid_fill.frag",
|
||||
"shaders/solid_fill.vert",
|
||||
"shaders/srgb_to_linear_filter.frag",
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "impeller/base/validation.h"
|
||||
#include "impeller/entity/contents/clip_contents.h"
|
||||
#include "impeller/entity/contents/content_context.h"
|
||||
#include "impeller/entity/position_no_color.vert.h"
|
||||
#include "impeller/entity/runtime_effect.vert.h"
|
||||
#include "impeller/renderer/formats.h"
|
||||
#include "impeller/renderer/pipeline_library.h"
|
||||
#include "impeller/renderer/render_pass.h"
|
||||
@@ -92,7 +92,7 @@ bool RuntimeEffectContents::Render(const ContentContext& renderer,
|
||||
/// Get or create runtime stage pipeline.
|
||||
///
|
||||
|
||||
using VS = PositionNoColorVertexShader;
|
||||
using VS = RuntimeEffectVertexShader;
|
||||
PipelineDescriptor desc;
|
||||
desc.SetLabel("Runtime Stage");
|
||||
desc.AddStageEntrypoint(
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <impeller/transform.glsl>
|
||||
|
||||
uniform VertInfo {
|
||||
mat4 mvp;
|
||||
} vert_info;
|
||||
@@ -13,5 +11,5 @@ out vec2 v_position;
|
||||
|
||||
void main() {
|
||||
gl_Position = vert_info.mvp * vec4(position, 0.0, 1.0);
|
||||
v_position = IPVec2TransformPosition(vert_info.mvp, position);
|
||||
v_position = position;
|
||||
}
|
||||
Reference in New Issue
Block a user