代码之家  ›  专栏  ›  技术社区  ›  Rob Pranay Rana

Photoshop PhotoFilter像素数学

  •  0
  • Rob Pranay Rana  · 技术社区  · 14 年前

    有人用过Photoshop中的图片过滤器吗?编辑>调整>照片过滤器。。。

    它似乎基本上是一种保持亮度的色调。

    具有变量:颜色、数量和亮度。

    2 回复  |  直到 14 年前
        1
  •  1
  •   TaslemGuy    14 年前

    red_filter = ( 1 , 0 , 0 ) * color

    我不认为有任何混合模式存在,因为任何透明覆盖系统,该系统会在一定程度上加深图像。

        2
  •  -1
  •   Brian Webster Jason    13 年前

    // Photoshop PhotoFilter style effect.
    
    // Input filter color.
    float4 FilterColor;
    
    // Implicit texture sampler.
    sampler TextureSampler : register(s0);
    
    float4 PhotoFilter(float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
    {
        return tex2D(TextureSampler, texCoord) * FilterColor;
    }
    
    technique GeneralEffect
    {
        pass Pass1
        {
            PixelShader = compile ps_2_0 PhotoFilter();
        }
    
    }