Ejemplo n.º 1
0
        private static string GetResultAssignment(ValueCount resultCount, string sourceName, ValueCount sourceCount)
        {
            string constructedVector = GlslVectorUtils.ConstructVector(resultCount, sourceCount,
                                                                       GlslUtils.vertexOutputPrefix + sourceName);

            return($"{resultName}.rgb = {constructedVector};");
        }
Ejemplo n.º 2
0
        private static string GetResultAssignment(ValueCount resultCount, TextureRenderInfo texture,
                                                  string uv0Name, string normalName)
        {
            string swizzle  = GlslVectorUtils.GetSwizzle(texture.TextureSwizzle);
            string texCoord = GetTexCoord(texture.UvCoord, uv0Name, normalName);

            return($"{resultName}.rgb = texture({texture.Name}, {texCoord}).{swizzle};");
        }